Resource icon

Enhanced User Interface v1.29i

Hey bc1, firstly just to say that the fact you're still about updating this fantastic 'mod' is pretty insane, so thanks :)

I've come across a bug recently that I don't know if you can help with.

I've been playing an, admittedly heavily modded, game that been going really well for a while, but when I booted it up again recently the ActionInfoPanel list with all the diplo icons info down the right hand side has glitched. The list of civs and city states doesn't actually update any more between turns and the city states have wierd glitchy icons appearing next to their city state icons. It's annoying because I'm going for a diplo victory and I can't easily see which city states are changing in and out of my ally list.

I've also noticed that some city state name tags have disappeared from above their on-map city.

The game is still playable and the actual diplo relations still exist and work, its just that the EUI doesn't immediately show it. And the weird thing is that it was working perfectly until I closed the game to take a break and then booted it up again, which I thought might mean that it was a mod that I've been using. I've already tried deleting the cache, which didn't do anything.

Screenshots and lua log attached. It should be noted that I've looked at the lua log and it mentions a lot of mods coding for civs that aren't in this particular game I'm playing

I have the UI_bc1 folder in assets\DLC (unless it has to be in the expansion pack 2 folder?)

Thanks in advance :)

Disable the mods and check if it happens, if it doesn't the mods are to blame.
 
Great that the random crash reason was successfully fixed ! :)

Was it intended in 1.29, that on the loading screen you no longer can hover over the uniques of your civilization to get more info about your uniques? Currently it only displays the name of eg the unique unit, but not all the other informatino that was shown in 1.28. Was this removed on purpose, or is this a bug?
(the tooltip with all the info was in 1.28 only displayed after loading was finished, so that might be a reason why it was removed. But especially in multiplayer, loading for most players might be finished, while waiting for other players to finish. So in this case it is still useful)
 
Im playing with some friends and none of us can host and load the save file, we can start a game, but whenever we try to load the game it goes back to the main menu. Someone without the mod can host the game.

Anybody knows how to fix this?
 
Im playing with some friends and none of us can host and load the save file, we can start a game, but whenever we try to load the game it goes back to the main menu. Someone without the mod can host the game.
Anybody knows how to fix this?
test if deleting the "FrontEnd" folder helps. If yes you may try only deleting specific files of that folder, to find out which one is causing the problem. then bc1 can fix it, if one of it is causing the issue.
 
Hi bc1,

I have the following suggestions:

  1. The LeaderHead folder makes some strings go over the button size, see screenshot. Maybe there is a way to adjust button size based on string length?
  2. The DiploTrade.lua in Improvements folder does not work as intended, if the user deleted EUIs TradeLogic.lua (or complete Leaderhead folder). The result (of line 35 "OnShowHide()") is, that all strategic/luxury ressources are hidden everytime the user opens the trading screen. This really sucks, maybe you know a better way to fix the spinning globe bug? (edit: out-commenting line 35 unhides it for AI tradescreen, but not for tradescreen between humans. and of course spinning globe is back then)
  3. You could add a description for promotions in UnitFlags when hovering over it. Not everyone knows what which promotion does and especially if there are promotions added by mods, a description is very helpful. See below my working example code to achieve this.
  4. In the CityState Popup you could add a list of players who are protecting the CS. See below for working example code, not sure if this is the best solution, maybe you have a better one.
  5. In the past, I always included a changed, but more or less full version of EUI in my modpack. It is alot easier for everyone trying to install it, but I understand if you don't welcome this. I could instead only include the files I changed from EUI and leave instructions where to copy them/which files to delete from original EUI. But this only works, if there is always a way to download the specific version of EUI I used for my compatibility files. From what I can see, right now it is not possible to download various different versions directly from you. So if I now make my modpack with 1.29a and someone downloads it in the future when there is eg. only version 1.30 to download at your page, my compatibility files will most likely not work. So this is another argument, why including the full EUI-version within my modpack is better. So the real question is: Why do you want people to only download it from you? I could instruct everyone to also download the original EUI.
  6. edit: would be a bigger tech tree possible? So every box can display more than the current items.
Screenshot of too small buttons:
Spoiler :

EUI too long text.jpeg



Code for Promotion Description in UnitFlags, UnitFlagManager.lua. Use the following function to generate a nice text you can use as Tooltip for promotionIcon:
Spoiler :

Code:
--==========================================================
-- hoverText with description, added by serp, idea copied from Flagpromotions mod.
--==========================================================
local function GetNiceHovertext(promotionInfo,unit)
    local hoverText = ""
    hoverText = string.format("[COLOR_YELLOW]%s[ENDCOLOR][NEWLINE]%s",
        L(promotionInfo.Description),
        L(promotionInfo.Help)
    )
    local promotionOverrides = g_promotionOverrides
    local promotionInfo_new_ID = promotionInfo.ID
    while promotionInfo_new_ID do -- add earlier rank promotions to the tooltip (eg add Drill 1 if we have Drill 2, especially helpful when they are different like Medic promotions)
        promotionInfo_new_ID = promotionOverrides[ promotionInfo_new_ID ]
        if promotionInfo_new_ID then
            promotionInfo_new = GameInfoUnitPromotions[promotionInfo_new_ID]
            hoverText = string.format("%s[NEWLINE][COLOR_YELLOW]%s[ENDCOLOR][NEWLINE]%s",
                hoverText,
                L(promotionInfo_new.Description),
                L(promotionInfo_new.Help)
            )
        end
    end
    if hoverText==nil or hoverText=="" then -- should not happen, but just to be sure...
        hoverText = promotionInfo._Name
    end
    return hoverText
end


Code for protecting civs of citystate in CityStateDiploPopup.lua
Spoiler :

Code:
    -- [...] right below "Ally Status" code within "OnDisplay" function:
    -- Protected by anyone?
    local protected_tooltip = Locale.ConvertTextKey("TXT_KEY_POP_CSTATE_PROTECTED_BY_TT")
    local sProtectingPlayers = getProtectingPlayers(g_minorCivID);
    local sProtectingPlayers_short = sProtectingPlayers
    if #sProtectingPlayers_short>30 then
        sProtectingPlayers_short = sProtectingPlayers_short:sub(0,29) .. "..." -- not enough space, but the tooltip will be complete
    end

    Controls.ProtectLabel:SetToolTipString(protected_tooltip);
    if (sProtectingPlayers ~= "") then
        Controls.ProtectInfo:SetToolTipString("[COLOR_POSITIVE_TEXT]" .. sProtectingPlayers .. "[ENDCOLOR]");
        Controls.ProtectInfo:SetText("[COLOR_POSITIVE_TEXT]" .. sProtectingPlayers_short .. "[ENDCOLOR]");
    else
        Controls.ProtectInfo:SetToolTipString(Locale.ConvertTextKey("TXT_KEY_CITY_STATE_NOBODY"));
        Controls.ProtectInfo:SetText(Locale.ConvertTextKey("TXT_KEY_CITY_STATE_NOBODY"));
    end
 
    -- [...]


---- function used above
function getProtectingPlayers(iMinorCivID)
    local sProtecting = "";
    local pOtherPlayer;
    for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do
        pOtherPlayer = Players[iPlayerLoop];
        -- if (iPlayerLoop ~= Game.GetActivePlayer()) then -- I think we should also show ourself, so outcommented
            if (pOtherPlayer:IsAlive()) then
                if (pOtherPlayer:IsProtectingMinor(iMinorCivID)) then
                    --print("ein spieler beschützt den stadtstaat")
                    if (sProtecting ~= "") then
                        sProtecting = sProtecting .. ", "
                    end
                    sProtecting = sProtecting .. Locale.ConvertTextKey(Players[iPlayerLoop]:GetCivilizationShortDescriptionKey());
                end
            end
        -- end
    end
    return sProtecting
end
With this added in CityStateDiploPopup.xml file right below "Ally" in the same stack:
Code:
                <!-- Protection -->
                <Label ID="ProtectLabel" Anchor="R,T" Offset="0,0" Font="TwCenMT18" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" String="TXT_KEY_POP_CSTATE_PROTECTED_BY">
                      <Label ID="ProtectInfo"  String="Information" WrapWidth="250" Anchor="R,T" AnchorSide="O.I" Offset="12,0"  Font="TwCenMT18" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" />
                </Label>

The strings for protecting:
Code:
    <Language_en_US>
        <Row Tag="TXT_KEY_POP_CSTATE_PROTECTED_BY">
            <Text>Protected By:</Text>
        </Row>
        <Row Tag="TXT_KEY_POP_CSTATE_PROTECTED_BY_TT">
            <Text>These players have pledged to protect this City State.  Attacking this City State and/or gifting gold/units may incur the wrath of these players.</Text>
        </Row>
    </Language_en_US>
 
    <Language_de_DE>
        <Row Tag="TXT_KEY_POP_CSTATE_PROTECTED_BY">
            <Text>Beschützt von:</Text>
        </Row>
        <Row Tag="TXT_KEY_POP_CSTATE_PROTECTED_BY_TT">
            <Text>Diese Spieler haben geschworen diesen Stadtstaat zu beschützen. Ein Angriff auf diesen Stadtstaat und/oder Gold- bzw. Einheitengeschenke werden diese Spieler möglicherweise erzürnen.</Text>
        </Row>
    </Language_de_DE>
 
Last edited:
I just started a new game using this mod and love it so far, but Babylon can't fire at barbarians. I click the fire button, and don't get the targeting arrow I'm used to getting when I hover over the Brute, and when I left-click on him nothing happens.
I'd like to provide any info I can to help debug the issue I'm seeing with not being able to fire city defenses.
EUI city fire works fine, but there may be an incompatibility with a MOD you're using. Helping means provide details and posting complete lua.log, lookup overview on how to do this
Now that it's 2021 it'd be extremely nice if this mod could also have a 1440p and 4k version so I don't have to pull out my bino's to read things...
Firaxis has not designed the UI to be scalable, don't expect me to work around this limitation... unless you're willing to spend several 1000's $$
Was it intended in 1.29, that on the loading screen you no longer can hover over the uniques of your civilization to get more info about your uniques?
intended
Im playing with some friends and none of us can host and load the save file, we can start a game, but whenever we try to load the game it goes back to the main menu. Someone without the mod can host the game. Anybody knows how to fix this?
some code was missing
test if deleting the "FrontEnd" folder helps. If yes you may try only deleting specific files of that folder, to find out which one is causing the problem. then bc1 can fix it, if one of it is causing the issue.
except for improvements only delete entire folders: deleting individual files only will break EUI
I have suggestions
i will think about it, but the suggested code is way too inefficient and bulky and would likely lead EUI to randomly crash all over again
 
Last edited:
I've just installed the latest version together with the latest Lekmod version. though it seems like worldwiew.lua has some kind of conflict making it impossible to move units. Without it though the game seems to run fine for the moment.

This problem could also be attributed to me running the game on Linux in a wine enviroment.

Is there anything I can do to help with finding out the cause?

I've attached logfiles playing one turn with only EUI witch works, one turn playing with Lekmod and Lekmap and no changes to EUI where I can't move units manually but auto-explore works, also fancy settler UI thing does not show. Finally are log files from one turn of Lekmod and Lekmap without worldview.lua I can now move units but the fancy settler UI thing is not there (which I guess is a part of worldview.lua?)

It also seems like frontend folder does not work with Lekmod and Lekmap, can't open advanced settings but works after removal
 

Attachments

  • civ-logs.zip
    44.2 KB · Views: 59
Last edited:
@bc1 the "move_to" command is not working well (1.29a not modified). When I use it to send a unit anyhwere, the "move to" mode is not ended, even if the unit has no movement points left, I'm stuck in this "move_to" mode. (when there are no movement points left, I also can not click the "move_to" button again to end it, because the buttons disappeared)

edit:
similar for the attack mode and for the city attack mode. we need to switch back to selection mode, if the user clicks anywhere.
 
Last edited:
I don't play multiplayer:
can you please try the attached fix candidate ?

except for improvements only delete entire folders: deleting individual files only will break EUI
With FrontEnd folder:
Multiplayer -> Internet/local -> Create New Game -> Load Game -> Choose from list -> spinning globe, but nothing happens, you can still go back. It should open the multilpayer lobby.
Without Frontend folder:
Multiplayer -> Internet/local -> Create New Game -> Load Game -> Choose from list -> we get back to the "create new game" screen.

For some reason without FrontEnd folder, this does not always happen the same way. When I restart the game, it sometimes works to get to the lobby loading a game.
And I have no clue why this is not fixed by removing the FrontEnd folder, which folder messes with the loading of a game, if not FrontEnd?


wtf. deleted EUI completely and no dlc/mod anywhere, but the loading still does not work...<
no clue what is wrong, I even deleted cache/moduserdata and let steam check game files, but I still can not load/host a multiplayer game, while few hours ago I was able to ?!
Meanwhile I can not even start a singleplayer game...

ok, no clue why it happens, but I found out this:
After starting the game, I can start singleplayer games without problem. I can also go back to main menu and start new ones.
I also can host a new multiplayer Internet game and load it (after a fresh start, not 100% sure if always the same).
But when I go to local (LAN) multiplayer game and try to start/load one, it does not work. And after that neither Internet nor singpleplayer work, until I restart the game.

Since I mod alot, it may be that I destroyed sth myself. But since "serket" had the exact same problem, and he does not use any of my mods, the only thing in common seems to be EUI... but don't know why this problem persists even after deleting...

even un- und reinstalling the game with completely new folder in documents did not solve it...

edit: FINALLY a restart of my PC solved it. So my guess is that EUI causes the problems (maybe also because I deleted seperate files, but I guess serket did not) and to revert this, I need to delete EUI and restart the PC (not sure if cache/moduserdata also needs to be cleared.. I don't want to try it again :D)
 
Last edited:
minor bugreport:
The line
Code:
insert( tips, L( "TXT_KEY_LEAGUE_PROJECT_POPUP_TOTAL_COST", activeLeague:GetProjectCost(row.ID )/100 ):match("[^.]*") )
InfoTooltipInclude.lua is problematic, because it only relies on the english translation. Depending on the language, the final sentence is different, which makes the match command not working as intended. For example in german we write a thousands with a dot like twothousands "2.000", which will result in a sentence like "the project cots 2".
So you should use something that is independed of the language.

After removing the :match, I see why you added it... and I fear there is no language-wide solution to prevent double sentences... Only thing that comes in my mind may be to only use the string until ~6 characters after "[ICON_PRODUCTION]", cause I guess in all languages the amount is shown after the icon.
 
Last edited:
Hey bc1,

I noticed the mod setting for Buy Plot icon and function inside the city view does not exist (as in 1.29a), and therefore the check always resets when closing city view... I know it's easy to change inside the file, but just wanted to let you know that it's there and a little annoyance.

Cheers,
 
Great update, playing a lot longer (hours) before a crash while using Civ V on linux version of steam (w and w/o additional Mods).
For your usable MOD listing, so far I have played a new start with the following Mods while using EUI1.29b without issues
  • Improved City View (EUI)
  • More Luxuries
  • Promotions-Expansion Pack
  • Game Options
  • Ingame Editor
I will add more as I use them.
 
I downloaded the most recent version and am unable to purchase tiles in my game. Any suggestions or does anyone know keyboard shortcuts I could try?
 
Hello,

Thank you for the latest update.

I am experiencing the following bug in the 1.29b version.
  • I have no mods
  • I am running the game on Mac OS X
  • and I have BNW, the version of the game is 1.03.279
When I am building the World's Fair project the tooltip doesn't work.
  1. If I do a fresh load where I have not hovered over any buildings the tooltip is empty and visually broken.
  2. If I first hover on top of building in production in another city for example, then I will see that building's tooltip.
When I downgrade to 1.29a, the tooltips works as intended.

I can't see anything interesting in the log files.

See screenshots.
Screenshot 2021-04-19 at 12.54.13.png Screenshot 2021-04-19 at 12.54.24.png
 
Hello,

Thank you for the latest update.

I am experiencing the following bug in the 1.29b version.
  • I have no mods
  • I am running the game on Mac OS X
  • and I have BNW, the version of the game is 1.03.279
When I am building the World's Fair project the tooltip doesn't work.
  1. If I do a fresh load where I have not hovered over any buildings the tooltip is empty and visually broken.
  2. If I first hover on top of building in production in another city for example, then I will see that building's tooltip.
When I downgrade to 1.29a, the tooltips works as intended.

I can't see anything interesting in the log files.

See screenshots.
View attachment 594223 View attachment 594224


Have same problem with International Games project at late game.
But the World Fair project doesn't cause problems to me, apparently due to the early/middle stage of the game.
 
I am playing vanilla Civ 5 on OSX with EUI; but now if I Retire and replay the Map I can only see my map (as per the new in-game demographics screen), as opposed to the old prior replay which showed the entire world map. Is there a way to restore the original functionality?

PS: I am also having the issue reported by Aristos, that I can no longer purchase land from the city screen.
 
Hello. I've recently installed the mod, and wanted to share a few thoughts.
One thing that for me personally was a bit tough to swallow after playing with default Civ UI for a long time were the very large icons next to many tooltips. I ended up removing the icons, because I'm not really sure about their purpose and found them extremely distracting. I ended up editing the files but it took quite some time since I'm completely unfamiliar with Civ5 modding. Please, consider making these icons optional in the future with an appropriate setting.
Another thing that I found to be a bit extra were the tile tooltips, while these are certainly helpful when you need them, in most scenarios they end up way too much of an info dump and the delay doesn't completely remove the distractive factor whenever these do pop up. Naturally I simply removed the folder as instructed, however there's one problem - the original tooltip doesn't get restored this way. This had a simple fix, but it took lots of time to figure out what to do :( I'm not sure if it's possible to make the default tooltip's removal a part of PlotHelp module specifically, but that would be nice.

Otherwise I haven't yet had much time to check out the mod, but it looks promising and from a few things that I've seen I'm going to enjoy it. Thank you for your work.


P.S. In case someone finds this post to deal with the same issues, here are my solutions to them:
To remove large tooltip icons:
  • open file "DLC/UI_bc1/Core/EUI_context.xml";
  • find the relevant tooltips that you do want to edit (in my case these were unit and "item" tooltips, the latter applies to pretty much everything including technology tree and social policy tooltips);
  • inside the tooltip tag locate an image tag with Texture="256x256Frame.dds" - this is the icon border and inside will be the icon image itself - hide the entire thing in a comment (<!-- -->);
  • open file "DLC/UI_bc1/Core/EUI_tooltip_server.lua";
  • find the function called "ShowTextToolTipAndPicture" and comment (--) the lines of code related to PortraitFrame (this takes care of majority of icons);
  • find the function "UnitToolTip" and comment lines related to PortraitFrame, plus IconHookup and CivIconHookup function calls (this deals with unit icons).
Here are some screenshots for reference, with changes already made.
EUI_context.xml
upload_2021-4-23_22-58-48.png


EUI_tooltip_server.lua - ShowTextToolTipAndPicture
upload_2021-4-23_23-45-52.png


EUI_tooltip_server.lua - UnitToolTip

upload_2021-4-23_23-37-23.png


To return the default tile tooltip: open "DLC\UI_bc1\InGame\WorldView.xml" and uncomment a line "<LuaContext ID="PlotHelpText" FileName="PlotHelpText" />"
 
Last edited:
Found a new problem in versions 1.29b and 1.29c.
Unable to start a new game with the "Barbarians Evolved (v 5)" mod. Pressing the Start Game button in the mods advanced setup screen returns the game to the Mods menu
1 29c ModsAdvancedSetup.jpg
Oops:
ModsMenu.jpg

Version 1.29a and earlier do not have this problem. The new game starts correctly.
1 29a ModsAdvancedSetup.jpg
 
Last edited:
Top Bottom