1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

User Interface Tweaks

Discussion in 'CivBE - Released Mods' started by IphStich, Oct 28, 2014.

  1. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    Hey everyone!

    I dunno about the rest of you, but I've found a lot of elements in the game's GUI to be either buggy, or just badly designed. This mod is primarily an attempt at fixing that. Not necessarily by giving you any extra information, but just presenting everything to you in a cleaner way.

    Steam Workshop page

    DOWNLOAD

    How to install:
    You should simply have to extract the contents of the zip into your Civ BE/assets/DLC folder. Next time you run the game, the appropriate files will be read in order and you should see the changes.

    How to use the options file
    Navigate to the game mod folder, open up the UIT_Options.lua file. Modify the lines and options for desired results.

    Changes in Version 5
    Spoiler :

    Improvements


    • While in city view, tiles worked by another city are now highlighted, and when moused over will show which city is working the tile
    • Added an option for displaying colonist work prediction radius
    • Made certain modifications more efficient to hopefully reduce CPU usage by this mod
    • Techs can no longer be accidentally selected in the tech tree while dragging the view
    • Changed the type of highlight used for tiles while in city view
    • When mousing over a city banner, now displays the tiles being worked on by that city, and the yield of all tiles in range (can be turned off from the options file)
    • Added a toggle all check in the diplomacy window for fast turns

    Minor Improvements


    • Fixed an issue where there was sometimes not a 1 pixel gap between players in the diplomacy window
    • The city production queue is now visible by default
    • Made the build predictor in the city banner right-aligned so that numbers with 2 or more digits wouldn't overlap the progress bar

    Bug Fixes


    • Fixed a big bug that would prevent the opening of the trade route overview after setting up a trade route with one of your outposts
    • Fixed a rare bug related to trade route sorting (super special thanks goes to cestbienmoi)
    • Fixed a rare bug related to orbital units and yield display (super special thanks goes to cestbienmoi)
    • Minor bug related to aircraft not being in a city


    Spoiler :

    Changes


    Minor Changes


     
  2. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    Reserved for later.
     
  3. bokaj

    bokaj Chieftain

    Joined:
    Jul 3, 2006
    Messages:
    86
    Location:
    Dornbirn, Austria
    Hm this looks cool, but the download link doesn't work :/
     
  4. Ryika

    Ryika Lazy Wannabe Artista

    Joined:
    Aug 30, 2013
    Messages:
    9,246
    Probably because the file is not yet approved.
     
  5. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    Oh snap. I didn't know it worked like that here. If it's still not approved, I'll upload it to Dropbox when I get home tonight.
     
  6. mnf

    mnf Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    659
    Not approved at the moment.

    Just curious. Is there any reason why it's in the form of a DLC, instead of a mod to be put into the My Games\CivBE\MODS folder? What's the difference?

    --

    The way I dealt with the huge citize icons is to simply remove the round button backing. Like this: http://i.imgur.com/apr6aTR.jpg, but then I found out that with the city overlap, some of the overlapped but unclaimed plots can be purchased from one city while not from the other city. Do you have this problem as well?

    Also, do you also have the problem where the city view screen doesn't remember zoom level, and always pull the camera back every time you enter the city screen?
     
  7. Daft73

    Daft73 ¯\_(ツ)_/¯

    Joined:
    Jan 23, 2008
    Messages:
    496
    Location:
    Baba Yaga's Hut
    If I'm not mistaken, this avoids the no mods for achievements.
    The following 'mod' is used in the same fashion.
    bc1's Enhanced User Interface :badcomp:
     
  8. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    I've edited the OP to replace the download link to a Dropbox file. Also added 2 screenshots.


    This is what my version looks like. As you can see, I didn't remove the icon backings, like you did.

    I haven't had any issues, and I'm not entirely sure what you may be referring to.


    Yeah, that's been an annoyance for me for a long time. It's one of the things on my to-do list (not listed here, but elsewhere).

    Edit: After having a quick look through the files, the best I could find were a couple of values in GlobalDefines.xml (CITY_ZOOM_LEVEL_1, 2, 3) that affect zoom out when viewing a city. I set them all to 500, modified, and re-uploaded the mod. I haven't tried it on other resolutions, but on my 1080p screen it fills up the screen quite nicely.


    Yeah, this is exactly why. It allows you to play with the interface tweaks without limitation. They should work in all modes of the game. In theory.

    Because it doesn't change any actual aspects of the game, and only modifies the interface, it should be fine.
     
  9. mnf

    mnf Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    659
    Nice! I'll try them out after work.

    The purchase problem I'll need look into it a little more. Oh and there's a bug in the game's YieldIconManager, I think. It shows 5 culture yields as 9 culture yield icons. You might want to look into that as well.

    Also, I did two more tweaks last night while looking around in the files if you're interested in adding them to your mod:

    1. Do not close purchase list after purchase; i.e. can purchase many items in one go: UI\InGame\Popups\ProductionPopup.lua
    Spoiler :
    Around line 156, change
    Code:
    if not g_append or not g_IsProductionMode then
    to
    Code:
    if not g_append and g_IsProductionMode then


    2. Treat "maintained items" (i.e. build research/energy/culture) the same as other items so it can be queued and moved up and down the queue. This also fixes the problem that when build queue is not activated and currently building a maintained item, then activating the build queue doesn't allow you to actually add items. Files to mod: UI\InGame\CityView\CityView.lua
    Spoiler :
    Around line 1078, after
    Code:
    local isMaintained = UpdateThisQueuedItem(city, i, qLength);
    add the line
    Code:
    isMaintained = false;
    to pretend there are no maintained items at all. This change lets the maintained items also have a move-down button in the build queue. Then fix the disabled "Add to Queue" button by around line 1104, change
    Code:
    if g_isProductionQueueOpen and (qLength >= MAX_QUEUE_ITEMS or anyMaintained == true) then
    to
    Code:
    if g_isProductionQueueOpen and (qLength >= MAX_QUEUE_ITEMS) then
    so it will only disable this button when the queue is full.


    To be honest, the ideal implementation for me would be that when there is a maintained-production item in the queue, then new items added should automatically be added just before that maintained-item. This makes it easy to add a new building we just finished researching into queues of our old cities that are building maintained-production items.

    As of now, I still have a few pet peeves regarding the UI:
    • The auto-resize of the production list when adding stuff in the queue will sometimes shift the list upwards and make people add the wrong items when adding many in a row.
    • Finding exactly where that Shift-O hot key to enter orbital view is located. I seriously want to change it to Shift-S as my right hand is always on the mouse. Every time I launch an orbital unit it returns to the map to show the launch animation, then goes back to orbital view, but the hotkey for launch "S" doesn't work anymore, forcing me to either click or use Shift-O to go back to the map.
    • No hot key to center map on capital(?). This is irritating in the early game when discovering stations and new factions and the map doesn't pan back to my units/capital because every unit's got orders already.
    • toggle resource/yield/grid hot keys don't work during planetfall
     
  10. spinka

    spinka Chieftain

    Joined:
    Oct 27, 2014
    Messages:
    9
    My sugestions:

    1. Buildings list visible by default:
    Spoiler :
    - CivView.xml:~305: CheckBox ID="ShowQueueBuildWondersButton" IsChecked="1"
    - CityView.lua:~88: local g_isCityContentsListOpen = true;

    2. Moving queue checkbox near production buttons in CivView.xml:
    Spoiler :
    - Delete line at ~307 (CheckBox ID="ShowQueueProductionButton"...)
    - Add new line with checkbox at ~182 like this:
    <!-- Production Top -->
    <Grid ID="ProductionArea"....
    <Grid Offset="5,0" .....

    <CheckBox ID="ShowQueueProductionButton" Anchor="L,T" Offset="0,-1" Style="CityCheckbox" String="{TXT_KEY_CITYVIEW_ACTIVATE:upper}" TextAnchor="R,B" IsChecked="0" ToolTip="TXT_KEY_CITYVIEW_QUEUE_O_TT" BoxOnLeft="1" />
    <Label Anchor="R,C" Offset="6,1" Style="CitySectionText" String="TXT_KEY_CITYVIEW_PRODUCTION_MANAGEMENT" />
    </Grid>

     
  11. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    Could you send me a save and/or screenshot? I'm not sure what you need to build to get to that level.


    I just recently added a new version/modification that commented out the line below that, so it now prevents closing of that list (beyond clicking the cancel button).

    The difference is that the list doesn't close when you change production. I personally always have queue mode on so I wouldn't notice a difference.

    What would people prefer?


    Nice idea. I'll definitely look into it, and thank you very much for the code/tips. They're a huge help.

    I think what I'll do is:
    1. Have maintained productions override each other
    2. Adding new other types of items, instantly move them up the queue, but still lets you add them
    3. Remove the ability to move maintained items up/down (from your example)

    I'll look into it, and update when I have something.

    Edit: To clarify: giving players the ability to move maintained productions up or down the queue would alter gameplay, as it allows players to effectively pause a production and dump some points into another type for a turn or more.

    I'm not saying its a bad idea. In fact I rather like it. It's just beyond the scope and purpose of this mod.


    The first one shouldn't be too hard.
    The second and third ones, well, from what I can tell, lua's ability to access and use key presses seems pretty limited. But I'll definitely look into it. There does seem to be some ability to get key presses.
    As for the fourth, I have absolutely no idea... I'll see what I can do, but I really have no idea.
     
  12. mnf

    mnf Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    659
    9 culture yield icon bug was uncovered in this thread: http://forums.civfanatics.com/showthread.php?t=536995
    Save file is attached to post #7 in the thread.

    Essentially you can get a 5 culture tile by Terracape (2c) + Prosperity last virtue (terrascape +1c) + Holomatrix orbital unit (each tile +2c) to get 5 culture yield on a tile.

    Regarding the auto-close of production popup, it affects the case when you get the notification to choose production, click on it, and the production list pops up in world view (without entering the city view). If you don't let it do this OnClose();, then this popup will stay open in world view.

    For the queue, I agree it's definitely better to not allow things to go after maintained-production items. Even without considering game balance, it becomes possible for a careless player to think he's queued stuff properly but the production will get stuck at the maintained item in the middle of the queue.

    Your plan with the queue and maintained items is perfect!

    For permanently show production list, maybe you can make use of that space to the left of the "Cancel" button to show a "Always show" checkbox? In this case I'd suggest some way to make it obvious whether the list is in production mode or purchase mode. Maybe play around with the background color of the "Add to Queue/Choose Production" and "Purchase" buttons?


    Oh and another unrelated tweak I'm thinking about is an "Opaque mini-map" option in the mini-map sub-menu along with the resource/yield/grid toggle options. Currently the mini-map will get tinted by the map color due to its alpha-transparency. Some players may prefer to always see proper colors on the mini-map.
     
  13. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    I'll have a look at the save ASAP.

    I've almost finished the queue/production modification. And you're right, so I'll change the code to fit what you gave me.

    (I've just been encountering a weird bug, which I'll have to get rid of before I can upload it)

    As for the other things, they seem like they may be low-priority for now. So I'll add them to the bottom of the list.
     
  14. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    Fixed. New version uploaded. Posted in original thread with explanation.

    New version also includes ongoing project queue management
     
  15. mnf

    mnf Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    659
    Thanks for the update! I absolutely love how the new production queue handles!

    Although when playing around with this, I started wondering why there isn't a "Remove" button for the first item (currently producing item) in the queue. In CityView, I was surprised to find that the "b1remove" button is coded in the XML, but I never remember seeing it, ever.

    It turns out the CityView LUA runs a check on the number of items in the queue, and do
    Code:
    if qLength == 1 then
    	Controls.b1remove:SetHide( true );		
    end
    but never goes back to show it again. Since absolutely every single queue will be at length 1 the first time it has any item, the player will never get to see the b1remove button.

    This is obviously a bug. Although I do recognize the importance of not letting the player end a turn with an empty production queue.

    I suggest we add an else clause to it to show b1remove properly. What do you think?

    With that, I say this production queue management is perfect except for not knowing what just finished. :D
     
  16. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    Haha, yeah, not knowing what just finished has been an irk of mine for a while now. After so many other 4X games that say "You've just finished X, what do you wanna build next?" I'm so used to it it feels weird not having it.


    I think you're right, and it is a bug. That said, the up queue swap button is also coded into the first production slot, but it also set to hidden. So, I just sort of assumed that I was being silly and it was intentional. But, no, I think you're right, and it is an unintentional bug (which is why the check is there).

    Code:
    else
        Controls.b1remove:SetHide( false );
    I also made a couple other (minor) changes around it:
    1. Moved the little "Next" text to the right to make room for the X button, making it look cleaner
    2. Changed "Next" to "Current" to remove ambiguity
    3. ^ Text will change position based on if there is an X button or not

    Changes should be reflected in the download.

    Edit: I had previously decided against fixing/implementing that X button because it changes gameplay in that it allows you to cancel a production item and have it be replaced by an ongoing development. Normally, you would have to swap the items, then cancel the old one, which isn't possible with ongoing developments. But you have convinced me it is very probably just an unintended bug, and it is not working as intended.
     
  17. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    After a LOT of effort, I finally figured out a way to display what has been built. It's a little hacky, and I haven't tried it in all situations, but its there!



    New version uploaded.
     
  18. mnf

    mnf Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    659
    This looks great!

    Why not use the in-game strings that already has many translations? The TXT_KEY_RESEARCH_FINISHED string in CivBEGameTextInfos_InGameScreens.xml parses out to "FINISHED: " in all the languages. It would make your mod applicable to all currently supported languages.

    And my queue still says "Next" on the top item :(
     
  19. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    You make a valid point. I hadn't thought too much about other languages.

    I think that having "FINISHED: EXPLORER" etc might look bad or unclean, as the object of importance is the word(s) at the end, and the text is right-aligned... But it might be a worthwhile change...

    I'm not too sure why it still says "Next". I may not have uploaded the new file, or perhaps it's an issue with other languages (I only changed the XML file for US English). I'll have to look into it when I get home tomorrow.
     
  20. IphStich

    IphStich Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    68
    For some reason, the DLC/mod can't replace or update the text files, so I won't be able to actually apply the next->current change.

    And, I don't think the language "finished" thing will matter for much longer, as Firaxis appear to be adding their own thing in a coming patch.
     

Share This Page

Ebates: Get Paid to Shop