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

Great People Info Mod

Discussion in 'Civ5 - Mod Components' started by BlakeTheGreat, Oct 6, 2010.

  1. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,154
    Location:
    Aotearoa
    Something screwed up my game, so I had to redownload everything. Your mod comes up as GREAT PEOPLE! on the top bar, and the tooltip display is the most recent other one you've had open. I presume it didn't download/install properly, but I'll still let you know if it isn't
     
  2. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    That is the default string for the display; As soon as it has something else to display that will be gone.
     
  3. BlakeTheGreat

    BlakeTheGreat Chieftain

    Joined:
    Oct 5, 2010
    Messages:
    15
    Location:
    Texas
    find the method: Controls.GreatPeopleString:SetText(String);

    then find the string that is passed and modify it to your liking.
    Hope I helped ;)

    Hmm that's odd, it shouldn't display anything until you've started your first GP.
     
  4. Spendoza

    Spendoza Chieftain

    Joined:
    Mar 20, 2009
    Messages:
    63
    Location:
    Ontario, Canada
    I made it
    Code:
    strGreatPeopleStr = strGreatPeopleStr .. "[ICON_GREAT_PEOPLE][COLOR:225:225:225:255] (" .. numTurns .. ")[/COLOR]";
    returns default string (GREAT PEOPLE! LUXURIES! RESOURCES!) so I put
    Code:
    numTurns = math.floor((((threshold - v)/rateOfChange)+1));
    in the variable declaration section and it returns default string. So I changed it to..
    Code:
    strGreatPeopleStr = ("(%i)", numTurns);
    strGreatPeopleStr = "[ICON_GREAT_PEOPLE][COLOR:225:225:225:255] " .. strGreatPeopleStr .. "[/COLOR]";
    with and without numTurns = math.floor....
    still returns default string
    I am very perplexed because as far as I can see variations of these combinations work for the other tooltips (that's how I'm learning, by dissecting and reassembling other peoples codes :lol:) but it doesn't for this one...
    I couldn't help but notice this line:
    END ADD (finally) :lol: no doubt man, no doubt...
     
  5. BlakeTheGreat

    BlakeTheGreat Chieftain

    Joined:
    Oct 5, 2010
    Messages:
    15
    Location:
    Texas
    what error are you getting?
     
  6. Spendoza

    Spendoza Chieftain

    Joined:
    Mar 20, 2009
    Messages:
    63
    Location:
    Ontario, Canada
    i'm not getting an error, it just displays the default text string (GREAT PEOPLE!) on the top panel instead of the GP Info
     
  7. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,154
    Location:
    Aotearoa
    Try deleting the mod and redownloading it, worked like a charm for me.
     
  8. Spendoza

    Spendoza Chieftain

    Joined:
    Mar 20, 2009
    Messages:
    63
    Location:
    Ontario, Canada
    It works fine for me as long as I use blake's code, its when I try and tweak it that it goes south for me ;)
     
  9. BlakeTheGreat

    BlakeTheGreat Chieftain

    Joined:
    Oct 5, 2010
    Messages:
    15
    Location:
    Texas
    Do you mean variable assignment section?
    Either way, try putting this:
    Code:
    local numTurns;
    if(rateOfChange == 0) then
        numTurns = "infinity";
    else
        numTurns = math.floor((((threshold - GPList[maxKey])/rateOfChange)+1));
    end
    
    strGreatPeopleStr = strGreatPeopleStr .. "[ICON_GREAT_PEOPLE][COLOR:225:225:225:255] " .. numTurns .. "[/COLOR]";
    --(or w/e you wanna make it display)
    
    in the variable assignment section and you should be golden. ;)
    Hope I helped.
     
  10. sandoval

    sandoval Chieftain

    Joined:
    Mar 25, 2002
    Messages:
    22
    i think you need to divide the unhappiness by 100 to correctly display the happiness toolbar. you're display is off by that factor. i changed it in the lua with info from another top panel ui mod which it's compatible with and it's ok now. i think it was the more top panel mod
     
  11. BlakeTheGreat

    BlakeTheGreat Chieftain

    Joined:
    Oct 5, 2010
    Messages:
    15
    Location:
    Texas
    wrong thread?
     
  12. sandoval

    sandoval Chieftain

    Joined:
    Mar 25, 2002
    Messages:
    22
    no, the code for the happiness toolbar in the the great people info mod is off by a factor of 100. in the top panel lua. i know your mod doesn't change the happiness toolbar, but i noticed that threw off the happiness calculations when i enabled your mod. i compared yours to other top panel mods and saw that yours was off by 100
     
  13. BlakeTheGreat

    BlakeTheGreat Chieftain

    Joined:
    Oct 5, 2010
    Messages:
    15
    Location:
    Texas
    Fixed, nice spot.
     
  14. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,068
    Gender:
    Male
    Location:
    On Earth
    Welcome to the Leopard project club since you've updated yours to v3, btw!
     
  15. gastonp

    gastonp Chieftain

    Joined:
    Dec 30, 2010
    Messages:
    6
    Location:
    Argentina
    Great mod BlakeTheGreat!!!
    Thanks
     
  16. X-Worf

    X-Worf Chieftain

    Joined:
    Feb 21, 2010
    Messages:
    91
    Location:
    Hamburg
    Is v3 also in german?
     
  17. grnmountain

    grnmountain Chieftain

    Joined:
    Dec 15, 2012
    Messages:
    1
    I really like this mod, but in G&K, the Great People counter replaces the Faith points counter for some reason. Otherwise though, this is great.
     

Share This Page