• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you build custom picture books for kids in seconds. Let me know what you think here!

Is there a solution to bit overflow?

cboldt2

Chieftain
Joined
Jan 31, 2019
Messages
13
Location
Texas
Good evening,

I have noticed that the maximum amount of science and culture (and possibly the other yields) that a city can produce per turn is around 214,748 units per turn. If a city produces more than that number (and it can and has happened), then the yields will reduce down to zero, as what would happen during a bit overflow scenario. Interesting enough, the maximum number that a city can produce a yield per turn is similar to the maximum value a 32-bit integer could be: 2,147,483,647; off by 4 digits. In the game, yields are calculated on the hundredths place, an additional two digits. But I have a theory the other two remaining digits are "hidden" calculating yields on the ten-thousandths place. It is entirely possible that the game has a cap on all integer values to be 32-bit in size. However, is there a way to increase the bit size? can we have cities produce yields more that 214,748 units per turn?

1. Can we increase the bit size from 32-bit to 64-bit?
2. Can we remove the two hidden decimals from the city yields from the ten thousandths place to just the hundredths place?
3. Any other solution?

Thank you.

(I will say that I still play on V40 of Caveman2Cosmos. If this has already been resolved, then I will see if I can make the changes to my version of the mod)
 
Literally discussing this issue the last couple days. So far, it's a lasting problem, unfortunately. Not sure WHY, to be honest - just change a few variable types, that's it. But - nope.
 
Literally discussing this issue the last couple days. So far, it's a lasting problem, unfortunately. Not sure WHY, to be honest - just change a few variable types, that's it. But - nope.
Python can't use them all nor can the exe so at times you will get problems with mismatches and each time you apply a longlong you grow closer to maf problems earlier. That and it's not totally trivial with any variable since going in and out of various functions then means that the translation must be done whenever the math meets where it hasn't been matched to the same type. It's not ... difficult. Relatively. But it CAN be quite a dive for each variable you want to do it to and it may not be quite enough of a solve in the end of that effort. Can't speak much for anyone else but I don't have the time.
 
Sad. Seems easy to someone who isn't doing it, lol.
I don't think it's possible to underestimate the size of the codebase and its vast complexity
 
Back
Top Bottom