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. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    When will the x-axis tooltips be under developement? I just can't wait, to be honest... :D
     
  2. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    I pretty much took a break this last week because figuring how to get the relationship graphs working was fairly intense (there's no way to actually draw lines so I have to use images and ended up writing external programs to generate the 100+ images and the XML that puts them in the correct place). I've actually been playing the game :eek:, fixing a few little things here and there when I come across them.

    If thanksgiving weren't coming up, I'd say next week. Because of the holiday, though, I probably won't have time to put that in (and the optional things in the todo list) until the week after.
     
  3. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    My initial feeling is that doing that is going to be pretty tough. It would look fine in a 4-6 player game but trying to place those icons in a 18-22 player game would be really hard without making it look like a mess. I'll have to give it some thought ...
     
  4. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    Could you not make a like 1-pixle-height image and tell the game to duplicate it? 'Might sound a little nooby since I have no experience with Civ 5 modding.
     
  5. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    That was the first thing I tried when I was creating the historical graphs but I quickly found out there's a maximum number of images (instances, actually) that can be displayed before the game crashes. It's somewhere around 3000, at least on my system, and that's no where near enough to draw all the possible connections between the civ icons.
     
  6. Perkus

    Perkus Chieftain

    Joined:
    Oct 16, 2010
    Messages:
    316
    Location:
    Ontario, Canada
    I had no idea you had to go to so much trouble to draw those lines! And to think I've found modding this a pain in the butt much of the time! :D
     
  7. kris159

    kris159 Kris P Bacon

    Joined:
    Oct 24, 2009
    Messages:
    99
    Gender:
    Male
    Location:
    Sheffield, United Kingdom
    City States can have more than one ally, can't they? Maybe include an option that displays city state relations in the tooltip?
     
  8. Iceco

    Iceco Chieftain

    Joined:
    Oct 27, 2010
    Messages:
    188
    City-states can have only one ally. If two or more civs have an influence of higher than 60, the one with the highest influence of the two is promoted to ally status, while the other stays friends.
     
  9. inort123

    inort123 Chieftain

    Joined:
    Nov 17, 2010
    Messages:
    11
    Why i cant use the infoaddict button on my game Why ! having issues with economy too!
     
  10. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    As I said in the Economy Mod thread: You are using 1.0.0.20. Both mods require 1.0.0.621. Patch your game.

    Always, always make sure you are using the latest patch if a mod is not working.
     
  11. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Info Addict v7 is now available for download. This is mainly a maintenance release, with some bug fixes and internal code changes. Also, text is now localized so you can send me translations and I'll include it in the mod files for future releases.

    • Fixed bug in global relations that caused tooltips and highlights to break when a defensive pact is present.
    • Added Thal's logger utility (http://forums.civfanatics.com/showthread.php?t=398227)
    • Added Whys's SaveUtils library (http://forums.civfanatics.com/showthread.php?t=392958)
    • All text is now localized. If you would like to add translations, use XML/InfoAddictText.xml as a template and send me your additions via PM on the civfanatics message board.
    • Technologies and net happiness have their own rankings in the world factbook empire views.
    • Games are identified by a time string kept in the save file instead of counting up resources. This makes saved data somewhat more efficent and, more importantly, makes Info Addict fully compatible with resource modification mods and static maps. If Info Addict is upgraded and an old saved game started, the data will be converted to the new format, ensuring backward compatibility. For games that are well on their way (500+ turns), this conversion process, while only happening the first time the saved game is started, may take anywhere from 20 seconds to a minute to complete.

    All changes should be compatible with saved games.

    Spoiler mod integrators: file changes and additions to v7 :
    Code:
    M      InfoAddict/InfoAddictReadMe.txt
    M      InfoAddict/XML/InfoAddictHistoricalData.xml
    M      InfoAddict/XML/DiscussionDialog.xml
    M      InfoAddict/XML/InfoAddictScreen.xml
    M      InfoAddict/XML/DiploTrade.xml
    M      InfoAddict/XML/InfoAddictCivRelations.xml
    A      InfoAddict/XML/InfoAddictText.xml
    M      InfoAddict/XML/DiscussLeader.xml
    M      InfoAddict/XML/InfoAddictFactBook.xml
    M      InfoAddict/Lua/DiploCorner.lua
    M      InfoAddict/Lua/InfoAddictHistoricalData.lua
    A      InfoAddict/Lua/InfoAddictLogger.lua
    A      InfoAddict/Lua/InfoAddictSaveUtils.lua
    M      InfoAddict/Lua/InfoAddictScreen.lua
    M      InfoAddict/Lua/InfoAddictCivRelations.lua
    M      InfoAddict/Lua/InfoAddictCollector.lua
    M      InfoAddict/Lua/InfoAddictLib.lua
    M      InfoAddict/Lua/InfoAddictFactBook.lua
    
     
  12. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,057
    Gender:
    Male
    Location:
    On Earth
    Good work and yet, i'd have a quick comment if you don't mind.
    Why is it that some mods battle out for prime space on the UI?

    The latest DK's Advanced Civ Rankings popup nullifies YOUR slot. TopPanel.lua is exploited by a few more, thus creating conflicts down the path.

    Somebody has got to find a way to coordinate such stuff and assure compatibility for the long-term. If not, we're all gonna endup with a problem bigger than what Vanilla does all by itself already!

    PS; Checking out the images folder, i suddenly realized how huge it must be. Good luck with finding a more streamlined or efficient way to render these graphs, though.

    PS2; What if i don't really need Thal's Logger & Why's SaveUtils within *your* InfoAddict component?

    PS3; And DO check this thread to read about a possible solution to this somehow messy encoding of DiploCorner.lua(s).
     
  13. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    robk, could I ask you to migrate to the newest version of SaveUtils? At the moment InfoAddict is incompatible with my own mod ;)
     
  14. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Of course! I just got back from vacation today so I'll take a look at that in the next day or two. Did the serialize format change? I briefly read through all the changes and it sounded more like global variable sharing was going on in the background for performance improvements; I figured that wouldn't interfere with an older version of saveutils.
     
  15. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    One thing that breaks compatibility is that when you call load() the return value if no data is present is now nil instead of an empty class table. It's no biggie, I just would like to add InfoAddict to the recommended mods list ;)
     
  16. I_qua_I

    I_qua_I Chieftain

    Joined:
    Nov 15, 2010
    Messages:
    562
    How is culture calculated on your graphs? I played one game where I managed to build every single wonder except chichen itza and all the culture buildings and always had artist slots filled (was trying to own the whole landmass my constantly culture bombing. The AI's culture was always just a fraction lower than mine (sometimes it would even go over according to the graph. I then noticed that the majority of my games are like this.
     
  17. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    For culture and science, I tried to adhere to the main game by matching the info in the demographics screen. So, in the historical graphs, culture is the number of social policies that have been adopted and science is the number of technologies that have been discovered.
     
  18. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    I have a suggestion when you're coding up a solution. It would be nice if we could use XML updates to add items to that menu. Something like:

    Code:
    <GameData>
      <DiploCorner MenuItem>
        <Row>
          <MenuText>TXT_KEY_INFOADDICT_MAIN_TITLE</MenuText>
          <PopType>ButtonPopupTypes.BUTTONPOPUP_NOTIFICATION_LOG</PopType>
          <PopData>817</PopData>
        </Row>
      </DiploCorner MenuItem>
    </GameData>
    
    Should be fairly clean and easy to integrate. I look forward to seeing what you come up with.

    You DO need the logger and saveutils in *my* InfoAddict component because I modified the logger to add a TRACE level and saveutils was being changed quite often at the time. Does that clear things up?
     
  19. robk

    robk Chieftain

    Joined:
    Sep 8, 2006
    Messages:
    210
    Location:
    Santa Monica, CA
    Funny thing is I unintentionally anticipated that change so my code checks for both the empty table and nil when load() is called.

    I just tried the latest version of saveutils but it's not playing very well with the current incarnation of this mod (Info Addict also kicks in before the LoadScreenClose event). I did notice that serialize and deserialize haven't changed so, unless I'm wrong, the version I have embedded in Info Addict should work with other mods using later version of saveutils, the only interaction point being the data saved in Plot 1 (which is where I save that one thing I'm saving).

    If I have to, I'll move the first call to load() to a LoadScreenClose event but I want to avoid that if I can because the first thing Info Addict does can get pretty lengthy ... well, a few seconds ... when reloading a game that's well into the 500+ turns range. It would be weird for someone to hit the "Begin Your Journey" button and then have a few seconds pause again (although ... it might just happen in parallel with everything else so it might not be that bad. I'll have to play with that when I try divorcing the mod from InGame.xml).
     
  20. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    How are you adding InfoAddict? I load as an InGameUIAddin and it works flawlessly with SaveUtils
     

Share This Page