1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

-14 +13 = +0

Discussion in 'Civ5 - Bug Reports' started by baldfalk, Apr 10, 2011.

  1. baldfalk

    baldfalk Warlord

    Joined:
    Mar 20, 2011
    Messages:
    242


    Halp, my IQ just fell out of my head.

    edit: Just confirmed that it persists through a save/load; here's the file. Patch .221
     

    Attached Files:

  2. SpearMan153

    SpearMan153 Prince

    Joined:
    Jan 10, 2011
    Messages:
    379
    Location:
    Maroochydore, Queensland, Australia
    rounding of hidden decimals
     
  3. Schalke 04

    Schalke 04 Knappe

    Joined:
    Dec 10, 2002
    Messages:
    429
    Location:
    Münster, Germany
    well, yeah that's weird... :D

    However, I got an idea which could explain it:


    The game seems to count any values to decibal number, and round them in the User Interface.

    I guess for the net income it uses the decibal numbers and not the rounded ones.

    For example:

    Income: 13,4 (13 rounded)
    Expenses: 13,6 (14 rounded)

    net income: 13,4 - 13,6 = - 0,2 which is a net income of 0 (rounded).
     
  4. baldfalk

    baldfalk Warlord

    Joined:
    Mar 20, 2011
    Messages:
    242
    I've never -ever- noticed it being off, except in this one instance. Guess I'll pay closer attention

    edit: Actually... are there even any decimals involved in expenditure in this case? I know Communism has a -% bonus on building maintenance, and Commerce likewise for roads, but this is extremely early game.

    edit2: Revisiting the save, you're actually charged the -1/turn suggested by Income/Expenses
     
  5. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,938
    Location:
    DE/NL/FR
    So, can anyone else confirm the glitch?

    :lol:
     
  6. MouseyPounds

    MouseyPounds Prince

    Joined:
    Nov 8, 2010
    Messages:
    417
    Location:
    Maryland, USA
    There could be decimals involved in the income as trade route income is not necessarily an integer. Although I can't open your save because of DLC, it might be useful to check the F2 screen and look at the gold breakdown on the left as that displays decimals for at least some of the values.
     
  7. dshirk

    dshirk Firaxian

    Joined:
    Oct 31, 2005
    Messages:
    879
    Confirmed. :)

    The game core is doing it's calculations in decimals, and the UI is rounding the numbers, which can occasionally manifest with what you posted above.
     
  8. baldfalk

    baldfalk Warlord

    Joined:
    Mar 20, 2011
    Messages:
    242
    Hah, didn't occur to me to check the Econ page. You're right, it's 14 outgoing, 13.15 incoming, with a net -0.85 which is consistent with the actual -1 deduction per turn when rounded.

    I guess the bug is in the UI somehow rounding to 0 (instead of -1 like it should, no matter how you look at it)
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,938
    Location:
    DE/NL/FR
    Thanks :).
    Moderator Action: Thread moved.
     
  10. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,240
    Gender:
    Male
    Location:
    On Earth
    Floating Integers can't be floored even in C? :D
     

Share This Page