User Interface Tweaks

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


  • Ryenji's More Tech Filters mod has been merged into this mod
  • You can now see the Top Panel (that contains your yeilds, and other resource information) during diplomacy discussions with AI
  • Added a map option that highlights all tiles that contain miasma that are outside of the fog of war. The miasma inside fog of war shouldn't need this (as it glows). This feature is defaulted to ON everytime you start or load a game, and can be turned off from the map options panel.
  • You can now set 'fast turns' for each player on an individual basis, and you can even do this for aliens. This is done from the diplomacy / relationships tab, by clicking the checkbox next to the civ you want to enable fast turns for. Fast turns simply turn on quick combat and quick movement when it reaches that player's turn. Fast turns will automatically turn off for a particular player when you go war with then.
  • The minimap now expands when you click on it. In addition, there is also a map option to turn the feature off
Units:
  • A major overhaul of the unit flag/icon positioning that should fix a lot of potential confusion and small issues. Most notably: orbital and civilian flags no longer overlap other unit flags; and aircraft flags are now always visible
  • Orbital units will now appear dimmed or faded if they are sleeping and the surface view is on. Additionaly, surface units will be faded while in orbital view
  • There is now a mouse over display while colony units are selected that predictions whether it is possible to build an outpost at a location, and the range of the outpost/colony
  • Notification for when a unit is close to death by miasma! Special thanks goes to Vice Virtuoso for writing the original version of this!
  • (With 'display yields for civilian units' option on) orbital units will now show yield icons (useful when launching yield-based satellites)
Cities:
  • A fairly significant overhaul of the city worker system. The gist of it is: You can now click on the ground itself to move workers, and that hexes without workers don't have an icon. This should make the screen cleaner and a little easier to parse. There is also an option on the top left of the City View to turn off this feature entirely.
  • A large change to the production queuing system that now allows you to queue items when there is an ongoing development project. New items will be inserted into the queue above the ongoing development item, and new ongoing projects will replace old ones.
  • Decrease the size and spacing of the buildings in the city view to make it easier to read and reduce the needless amount of empty space Image
  • Can now delete/cancel current production items if there are queued items
  • Build finished notifications now tell you what was finished
Trade Routes:
  • A 'repeat previous route' button has been added to trade conveys (hotkey 'R')
  • Added a number of additional sort options to the trade route list. Special thanks goes to Cairdazar for this.

Minor Changes


  • Active trade convey icon flags appear dimmed
  • Zooms out significantly less when viewing larger cities
  • Moved the 'number of turns till production complete' number on city banners to make the icon itself more visible
  • Changed the faction colors for Pan, ARC, and Franco to make them easier on the eyes
  • Tweaked the culture border numbers a little to make them less obtrusive (might need a little work, suggestions?)
  • Fixed minor bug where culture yield values of 5 were incorrectly displayed as 9
  • The new sorting options for trade routes will hide the sections they no longer apply to
  • Re-arranged the new trade route list so that Stations appear before Outposts, before your own Colonies, before other players' Colonies
  • In the City View: the building list is visible by default, and each section is also collapsed by default. Also added an "Auto-Collapse" toggle which will automatically collapse the building list categories when you close the City View.
  • The Queue Toggle check box has been moved to near the production buttons for City View image
  • A new highlight displaying the maximum work range of the city has been added while in City View
  • If you're in Orbital View when your turn ends, the game will now exit from Orbital View automatically
 
Reserved for later.
 
Probably because the file is not yet approved.

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.
 
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?
 
I've edited the OP to replace the download link to a Dropbox file. Also added 2 screenshots.


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?

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.


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?

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.


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?
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:

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

 
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.

Could you send me a save and/or screenshot? I'm not sure what you need to build to get to that level.


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

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?


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.

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.


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

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

Fixed. New version uploaded. Posted in original thread with explanation.

New version also includes ongoing project queue management
 
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
 
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

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.
 
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.
 
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 :(
 
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 :(

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.
 
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 :(

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.
 
Top Bottom