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

[UI] More Unit Information

Discussion in 'Civ5 - Mod Components' started by dilandau, Oct 5, 2010.

  1. dilandau

    dilandau Chieftain

    Joined:
    Aug 19, 2008
    Messages:
    19
    This mod aims to provide more and better organized information on Units.

    Vesion 1

    Features:
    - A new screen: Units Overview, provides enhanced unit sorting and filtering. You can access it via Military Overview.
    - Display a unit's level and experience in Unit Panel.
    - Display unit information in Plot Help Popup.

    Fixed a possible bug by Firaxis in Military Overview, Now you can switch the unit selection in Military Overview.

    Mod Hub category: User Interface > Widgets

    You can download it from CivFanatics

    Units Overview

    Unit Panel

    Plot Help Popup


    The possible bug(by Firaxis) in MilitaryOverview.lua
    Spoiler Firaxis' code :

    Code:
    [COLOR="Red"]function UnitClicked()[/COLOR]
        local pSelectedUnit = UI:GetHeadSelectedUnit();
        if( pSelectedUnit ~= nil and
            pSelectedUnit:GetID() == unitID ) then
            UI.LookAtSelectionPlot(0);
        else
            Events.SerialEventUnitFlagSelected( Game:GetActivePlayer(), unitID );
        end
    end
    


    Spoiler my revision :

    Code:
    [COLOR="Red"]function UnitClicked(unitID)[/COLOR]
        local pSelectedUnit = UI:GetHeadSelectedUnit();
        if( pSelectedUnit ~= nil and
            pSelectedUnit:GetID() == unitID ) then
            UI.LookAtSelectionPlot(0);
        else
            Events.SerialEventUnitFlagSelected( Game:GetActivePlayer(), unitID );
        end
    end
    
     

    Attached Files:

  2. marekb

    marekb Warlord

    Joined:
    Jun 4, 2006
    Messages:
    229
    Very nice mod. :) Now it is possible to select fortified/slept unit from Military Overview screen.

    Some more filters: Naval Units, Air Units, Ranged Units would be nice.

    If it is possible, do it compatible with Gilestiel All Promotions description in tooltip mod.
     
  3. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    Thank you for this! It's been a constant annoyance of mine how developers of Civ seem to have this urge to hide important information from the users. Remember when they added the useful "At a Glance" screen to Civ IV foreign diplomacy, then removed it? Grrr!
     
  4. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
  5. marekb

    marekb Warlord

    Joined:
    Jun 4, 2006
    Messages:
    229
    Some minor issue I've noticed: air units are in "civilian unit" tab.
     
  6. dilandau

    dilandau Chieftain

    Joined:
    Aug 19, 2008
    Messages:
    19
    Thank you for your advice. I didn't konw code can be nested in spoiler.

    What do you mean?
    Perhaps my post was not clear.
    I've got no problem. In contrast, I thought there is a issue in Firaxis' code.
    This issue causes the unit selection doesn't work in Military Overview.
    IMO, function UnitClicked should have a parameter unitID.
    Comparing to UnitList.lua, I am pretty sure it's not a feature, but a bug.
     
  7. dilandau

    dilandau Chieftain

    Joined:
    Aug 19, 2008
    Messages:
    19
    Thank you for the info.
    Firaxis cheated me. In military overview, air units are put under the seperator line. namely, they belong to civilian category.
    I'll fix it in next version.
    btw, besides Naval Units, Air Units, Ranged Units filters, HP, level, Exp, what kind of info do you think that should be displayed in the Units Overview?
     
  8. bobbyboy29

    bobbyboy29 I was saying boo-urns...

    Joined:
    Oct 14, 2008
    Messages:
    1,401
    Location:
    Melbourne, Australia
    This looks like a great mod!
    I think it would be nice to mention potentially whether they are in friendly, neutral or enemy terrain. Also I don't know if its possible but if their were a columen for whether or not a unit is "in danger". i.e within range of an enemy unit by bombardment or direct attack, that would be cool too!
     
  9. Shevek

    Shevek Prince

    Joined:
    Mar 8, 2002
    Messages:
    463
    Location:
    Berlin
    Thanks for this mod. It works fine for me and is very useful.:goodjob:

    It would be great, though, if it didn't need so many clicks to get the unit overview up.
    ATM I go Info Panel -> Unit List -> Military Overview -> Unit Overview.
    Or is there a shorter way that I have missed?

    Anyway, I am using it and like it.
     
  10. Perkus

    Perkus Prince

    Joined:
    Oct 16, 2010
    Messages:
    316
    Location:
    Ontario, Canada
    Yeah, I came here to report a related bug: When you turn on the civilian filter, Fighters show up there. It seems they don't have levels and earn XPs (weird).
     
  11. Perkus

    Perkus Prince

    Joined:
    Oct 16, 2010
    Messages:
    316
    Location:
    Ontario, Canada
    Well, I'm not sure if sure if dilandau is still maintaining this mod, it appears as tough he hasn't posted at these forums in over a month. I really like this mod, and have begun patching some of its problems on my own. So I'm attaching several rar'ed .lua files which you should be able to just drop into the version .1 folder of this mod, overwriting the originals. These fix/add the following:

    • fix sorting / filtering of air units (they were being treated as civilian units)
    • display level and XP in the UnitPanel for air units (were blank like civilians)
    • round off unit's fractional "moves left" to 2 decimal places so it doesn't spew about 10 of them
    • show HP for civilians (they can theoretically be hurt by citadels, bombardment, city damage mods, etc.)

    Unfortunately it's quite a pain merging all the various UI tweaks and patches in the .lua files that have to be fully replaced. I have several other changes already included in these files that I don't particularly feel like removing just to try and get you guys these fixes. I think they're all good changes anyway. So you'd also be getting these mods:

    1) Gilestiel's "All Promotions Description Tooltip v.7". This:
    • adds a big tooltip listing the text of all promotions to the unit portrait in the bottom left unit panel.
    • has some sort of undocumented small fix to worker build rates displayed in the bottom left unit panel.

    2) My own "Rename Units Anytime v.2" by right clicking on a unit's name mod functionality (without the minor tooltip change, which would need a .xml / .modinfo change)

    3) A different fix for displaying really long unit names in smaller fonts than was in the offilial .62(1) patches. I'm no longer sure where this originally came from! But it seems to work well enough.

    4) A new version of UnitList.lua, which fixes the listing of air units along with civilians in the small version of the unit list. This will NOT load from being placed into this mod folder unless you edit the modinfo file to add it in. It's not a big deal if you don't do this, it'll just be ignored. I'm just throwing it in for completeness and so that it can make it into any modpacks that pick up my changes.

    It's up to you if you want to just ignore this, try this stuff as is or merge it in/out yourself with your other mods. Of course everyone's welcome to include my fixes in any update to this mod or modpacks that use it. My own fixes are clearly labeled "Perkus" in the scripts so they can be separated from the other stuff.

    Hope somebody finds this useful. This mod is also in CCMAT, I believe, so hopefully the fixes will eventually get merged into that.
     

    Attached Files:

  12. nebnotrub

    nebnotrub Chieftain

    Joined:
    May 26, 2010
    Messages:
    11
    I found it useful. Thx perkus
     
  13. TempusSolo

    TempusSolo Chieftain

    Joined:
    Dec 5, 2010
    Messages:
    9
    Gender:
    Male
    Any chance of getting this to work with the latest set of patches? Seems to have stopped working with the Dec patch.
     
  14. Sneaks

    Sneaks Brooklyn Bum

    Joined:
    Oct 15, 2010
    Messages:
    1,877
    Location:
    NYC
    Asking permission to use your mods in a new CCMAT build.
     
  15. robal1991

    robal1991 Chieftain

    Joined:
    May 2, 2011
    Messages:
    74
    Location:
    Poland

Share This Page