research overflow can eventually wrap into negative values

vexing

knows
Joined
Dec 24, 2010
Messages
2,668
if you get enough research overflow, it will eventually go beyond the bound for storing the number and wrap into negative. i'd guess this happens at 214,748 and goes to negative 214,748.
i'm going to be sad when my gold wraps into the negatives =(
 

Attachments

  • wrap.jpg
    wrap.jpg
    69.4 KB · Views: 1,897
if you get enough research overflow, it will eventually go beyond the bound for storing the number and wrap into negative. i'd guess this happens at 214,748 and goes to negative 214,748.
i'm going to be sad when my gold wraps into the negatives =(

:wow: Wow, what kind of games are you playing that you're getting such enormous numbers?

The screenshot is actually pretty funny. "Who knows what the future holds?" Apparently, massively negative research! :lol:
 
This apparently also happens with values such as research amount (not just your overflow)... I'm running a game right now with a mod that adjusted research values to 5000%... from modern era up the research required is a negative value and any research will complete in 1 turn.

Sad that they overlooked people wanting even slower paced research games (although build times are still full speed - I enjoy having several hundred turns to use a unit type before I need to upgrade, makes for some grueling battles).
 
Confirmed. I had it too. Has anyone mailed it to 2k? There's a suggestion on 2k forums, where to send it.
 
if you get enough research overflow, it will eventually go beyond the bound for storing the number and wrap into negative. i'd guess this happens at 214,748 and goes to negative 214,748.
i'm going to be sad when my gold wraps into the negatives =(
This apparently also happens with values such as research amount (not just your overflow)... I'm running a game right now with a mod that adjusted research values to 5000%... from modern era up the research required is a negative value and any research will complete in 1 turn.
Game design doesn't necessarily have to consider 5000% modifiers, but it should not affect regular gameplay on large maps.

I see two solutions:
- go from int32 to int64
- as minimum, identify the overload and keep the value at maxint.

At any rate, this bug is confirmed as of 1.383
 
Back
Top Bottom