1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Automatic Tooltips

Discussion in 'Communitas Expansion Pack' started by Thalassicus, Jan 26, 2011.

  1. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    I'm building a system where tooltips are automatically created from the game data files (most of them are hand-written in every language in vanilla).

    In the CiV code the capability to do this is provided and partially used, but for whatever reason just wasn't finished. I've included the progress on this in Combined v4 and recent versions of the beta. This is in large part thanks to alpaca's work figuring out how to retrieve many of the individual stats for buildings. I designed a way to take this and organize it in a table, created an algorithm to loop through the table, refined it further and you have what you see now.





    Once this system is fully armed and operational:
    • Solves all current and future tooltip errors.
    • Greatly reduces time required to make mods. I know that personally about a fourth of my time's been spent creating and updating tooltips.
    • Automatically localizes mods for users of Español, Français, Deutsch, and other versions of Civ, once I get the core tooltip file translated. I've done some preliminary attempts to try and get basics in place for the first two languages, though I'm not a native speaker of either one so it's probably rather odd grammar. (If you might be able to help with that, please see the translations thread here.)

    Currently this system is only active for buildings. I want to get all the bugs hammered out, then extend it to other object tooltips (mainly units and promotions), and release it as a stand-alone mod.

    For modders out there, I'm attempting to design the internal workings of the code so it's easy to extend. If you wish to add stats (sql columns) to one of the game's tables and create an auto-tooltip for the new stat, you won't need to modify the core InfoTooltipInclude file at all or override it in your mod. There's two main components to do this. It relies on the LuaEvents "super global" designed to pass data between scripts:

    • A function to call for adding new stats to the tooltip table(s).
    • An event generator instructing all mods to proceed with calling this function.
    Both of these can be found in the InfoTooltipInclude.lua file, currently in the Unofficial Patch sub-component of combined balance package. I'll put together more documentation on this once I've made more progress on the tooltip engine.
     

    Attached Files:

  2. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    Do you mind if I copy your tooltip version back to PWM?

    Big Ben and the Statue of Liberty are missing a description. And I think it's more accurate to say "consumes 1 coal" instead of "requires 1 coal"
     
  3. civcivv

    civcivv Chieftain

    Joined:
    Dec 1, 2009
    Messages:
    126
    Location:
    London
    That would be quite nice I imagine as it would display the tooltip during the Civ selection process as well?
     
  4. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    No, it doesn't. Some parts of it need an active player instance, this isn't displayed for the same reason that the civilopedia isn't accessible outside of the game.
     
  5. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    I originally used the "consumes" word, then changed it to "requires" for consistency with their existing system, though you're probably right. Even with the active player part it's still feasible to give basic info at the front, I think it was just a time/benefit situation where they focused on other things.

    Go ahead and copy it back, a good chunk of it's your work. :)
     
  6. OursIstheFury

    OursIstheFury Chieftain

    Joined:
    Apr 13, 2013
    Messages:
    21
    Sorry to bump an old, old thread but it's relevant.

    Though I like the tool tips I feel like some of the descriptions are still ambiguous, especially on things that may have been altered. Any listing I can reference for clarification? Or is there some kind of (visual) editor I could use just to view the building/wonder attributes?

    Just wondering.
     

Share This Page