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

Info Addict

Discussion in 'Civ5 - Mod Components' started by robk, Oct 12, 2010.

  1. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Earlier, I had given thought to adding tooltips to each of the graph segments but two things held me back: the lines are really teenie and those tooltips would be constantly changing with the slightest movement as you move the mouse around and I don't know how the civ5 engine, as you said, would handle a thousand or so of those things in the same space.

    What you're talking about is a little more simple. It sounds like there would be one tooltip for each x-axis point listing all the values at that time. It sounds pretty cool and, I think, fairly simple to execute. I'll give it a try in development to see how well it turns out and, if it looks good, I'll add it in.

    Thanks for the idea :D
     
  2. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    Nice mod, I like what I'm seeing so far. From a power-gamer perspective, the amount of info makes the game quite a bit easier, though. Having detailed ranks for each stat means you can make much more informed decisions about who's dangerous, etc.

    Not that I mind, I actually think that info should be available to some extent, but it would be even more fun if you added some uncertainty to the data like a 20% of the total value random number added or subtracted from each civ (of course continuous in each turn). To go completely mad, you could even increase this accuracy as tech level increases with Computers making it 0.

    A more useful suggestion: Could you store the highlightpid state when changing the graph type? Nice feature, by the way. Code below should store the state and make it unhighlight when you click the empire button again (if I'm not mistaken, didn't test it).

    Code:
    local storedPID
    
    function EmpireKeyButtonHandler( pid )
      if pid == storedPID then
        storedPID = nil
        pid = nil
      else
        pid = pid or storedPID  
      end
    
      DrawGraph(lastGraphType, pid);
    end
    In fact, even better would be making each empire button an on/off toggle for the corresponding graph.

    A y-axis would also be good. If you implement the tooltip for the x-axis, be sure to make it display the turn number and time in letters for me :)
     
  3. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Funny you mention that because I had the exact same thoughts when I started. In fact, the first name for the mod was "Implied Espionage" because I was going to make the data more accurate as better technologies were discovered, just as you suggested. I ultimately rejected the idea because presenting incorrect data would, essentially, make the mod useless and for those who don't want to know, the option exists to just not use the mod. I had more fleshed out thoughts on it beyond that but that's the basic conclusion I came to. I also justify it in game terms by thinking: once a civ has been met, diplomatic and trade relations open and it's pretty easy for general information like what's presented in the graphs and factbook to make it back to the civ leaders. The numbers are probably a little more precise than what was available to an ancient civ but even then, knowing if the other civilizations were "really big and strong" vs "really tiny and poor" was common knowledge.

    I actually coded that last part in today since it was sorta in the back of my mind anyways. So, in the next version, you will be able to highlight multiple civs and the highlighting follows you around as you click through the different graphs. To turn off highlighting, you just toggle the civs off and you're back to normal. The only thing I'm not happy with is how I'm highlighting the currently selected civs in the left rail but I'll figure that out eventually.

    I hope you don't mean displaying the time as " .. turn number three-hundred eighty-four, the year nineteen-hundred sixty-three Anno Domini .. ". That might be a bit cumbersome :lol:
     
  4. Madeiner

    Madeiner Chieftain

    Joined:
    Oct 3, 2010
    Messages:
    5
    I wanted to report a bug:
    Starting in any era other than ancient makes the graph display "no data yet". I don't know if this is resolved after a number of turns or not.
     
  5. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    Sins of a Solar Empire does that. However, I don't think you'de need the time and the turn number... It's a turn based stratergy, there's no concept of "time" (so to speak).

    Anyway, maybe you could average the values of the tooltip when it gets overcrowded so that it can only displays, say, 400 tooltips with different values at once even when the game has been 600 turns... If you get me...
     
  6. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Yep, you're right, starting in the later eras breaks the graphs. It turns out the data is saving correctly but I messed up the graphing part for late start games. I'm working on a fix now and it will be included in the next version. If it turns out to be simple enough, I'll post a workaround too.
     
  7. Madeiner

    Madeiner Chieftain

    Joined:
    Oct 3, 2010
    Messages:
    5
    Turns out the graphs do get drawn later in the game.
    I suppose, but i'm not sure, they become visible once a number of turns equal to the starting turn number has passed.

    For example, if i start in classical era (game start at 75 turns), graphs become visible after 75 turns. Not really sure though.
     
  8. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    Aww... crap.

    Well the uncertain data might be more interesting for a gameplay-related mod than a UI mod. For highlighting the buttons, some kind of "pressed button" bevel would work I think.

    Yeah but the timeline is for flavor. The graphs display the time but for me the number of turns is more relevant.
     
  9. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    I've got a fix commited in my dev copy for the advanced era start games but, if you want to take stab at sorta fixing it now in v3, give this a try ....

    Open up the file InfoAddict/Lua/InfoAddictHistoricalData.lua and look for two lines that look like this:

    Code:
    local currentTurn = Game.GetElapsedGameTurns();
    They should be at line #105 and #248. Change those lines to:

    Code:
    local currentTurn = Game.GetGameTurn();
    That should work for now though it might throw some errors in the LUA console when loading the initial set of data (if you happen to have the console open). Also, it still scales the x-axis back to 4000BC so you get a huge long line of nuthin' starting from the left.

    This is completely fixed in the new version, though, which I hope to have ready later this week.
     
  10. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    Interpretation fail on my side! I thought you meant the time the turn ended (as in what time it was on your computer when you pressed the "end turn" button). I see where you're coming from now. That would be relatively handy.
     
  11. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    Nah, what do we have the perfectly fine clock mod for :lol:
     
  12. PieceOfMind

    PieceOfMind Drill IV Defender Retired Moderator

    Joined:
    Jan 15, 2006
    Messages:
    9,312
    Location:
    Australia
  13. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    I just uploaded v4 of Info Addict a few minutes ago with these changes to the mod:

    • Added a zoom button to view the last several turns without the graph resolution being lowered. Useful for seeing immediate effects of recent actions.
    • Removed the initial vertical bar that always sat on the left. It indicated an initial value of zero for every line, even when the first value wasn't zero.
    • Highlights are persistent through graph changes now.
    • Multiple civs can be highlighted at once.
    • Added light buttons (pips) next to each civ to indicate which one's are selected.
    • Fix for advanced starting era games.
    • Cheat mode is indicated in the main Info Addict title bar now.
    • The last graph drawn, current highlights and zoom state persist through turns now.
    • General code improvements.

    All changes should be compatible with saved games and previously broken advanced starting era games should have working and fully populated graphs now.

    Spoiler mod integrators: file changes and additions to v4 :
    Code:
    M     /InfoAddict/InfoAddictReadMe.txt
    M     /InfoAddict/XML/InfoAddictHistoricalData.xml
    M     /InfoAddict/Lua/InfoAddictHistoricalData.lua
    M     /InfoAddict/Lua/InfoAddictScreen.lua
    M     /InfoAddict/Lua/InfoAddictCollector.lua
    M     /InfoAddict/Lua/InfoAddictLib.lua
    M     /InfoAddict/Lua/InfoAddictFactBook.lua
    A     /InfoAddict/Art/selectedpip60.dds
    A     /InfoAddict/Art/notselectedpip60.dds
    A     /InfoAddict/Art/selectedpip70.dds
    A     /InfoAddict/Art/notselectedpip70.dds
    A     /InfoAddict/Art/selectedpip.dds
    A     /InfoAddict/Art/notselectedpip.dds
    


    Edit: Screenshots are updated in the OP. I've uploaded the zip file to the civ file database and linked to it from the OP, as well.
     
  14. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Thanks to everyone who's complimented the mod. I appreciate it! :D
     
  15. gnosisQ

    gnosisQ Chieftain

    Joined:
    Oct 2, 2010
    Messages:
    11
    Great stuff robk, I've also been enjoying the mod from Santa Monica :)

    Appreciate the new version, so many goodies, now go enjoy some of this sunshine!
     
  16. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,149
    Location:
    Aotearoa
    Awesome, I'm loving this.

    Will this work with the increased demographics mod?
     
  17. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    The improved demographics mod adds to the demographics tab, InfoAddict adds a new item to the dropdown menu.

    The two will work fine together.
     
  18. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,149
    Location:
    Aotearoa
  19. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Here are some teaser images for the next version of Info Addict :mischief:
     

    Attached Files:

  20. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Looks awesome. :goodjob:

    The 231 connections is oddly interesting looking... :p
     

Share This Page