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

[FIXED] Happiness calculation wrong - garrisoned units not included

Discussion in 'Civ5 - Bug Reports' started by akamal, Oct 1, 2010.

  1. akamal

    akamal Chieftain

    Joined:
    Apr 17, 2006
    Messages:
    61
    Seems the breakdown of your empire's happiness is not always correct. The attached screenshot shows Happiness at zero, but the detail breakdown show Total Happiness as 127, with Unhappiness as 138.

    If you manually add up the happiness bonuses they come to 138, so the total of zero is right, it's just the break down that's wrong.

    1.0.0.20 (the second one), Win7x64, no mods, save attached
     

    Attached Files:

  2. sanabas

    sanabas Psycho Bunny Hall of Fame Staff

    Joined:
    Nov 24, 2004
    Messages:
    4,269
    Location:
    Canberra, Australia
    If you change things around, does the discrepancy remain the same as the happiness from garrisoned units?
     
  3. akamal

    akamal Chieftain

    Joined:
    Apr 17, 2006
    Messages:
    61
    It certainly does, I hadn't noticed that!

    The bug is in...\Assets\UI\InGame\TopPanel.lua @ line 534: iGarrisonedUnitsHappiness is not being included in the total happiness calculation.

    cheers
    ak
     
  4. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,938
    Location:
    DE/NL/FR
    That you can see the bug in the source code is for me confirmation enough.
    Moderator Action: Moved.
     
  5. kattana

    kattana Warlord

    Joined:
    Oct 28, 2005
    Messages:
    217
    while the total happiness is correct on the top toolbar, when you hover over the happy face and get the drop down showing details, happiness created by garrisoned units shows in the listing, but is not in the total happiness count.

    example:

    i have 4 excess happiness showing on the overview at top.

    when i open the detail drop down it will show 30 total happiness from the 6 luxuries i have but not count the 4 garrisoned units for a true total of 34 happiness, even though they are listed and count towards the true total.

    and 30 total unhappiness
     
  6. mihaifx

    mihaifx Warlord

    Joined:
    Oct 1, 2010
    Messages:
    169
    Location:
    Romania
    Agree. Overall happiness is correctly calculated, it's just the display which is wrong.

    Moderator Action: Threads merged. The_J
     

Share This Page