Resource icon

Enhanced User Interface v1.30m

This should make the code compatible with both the unmodded game and communitas; in the global section of PlotHelpManager.lua:

PHP:
function Contains(list, value)
	for k, v in pairs(list) do
		if v == value then
			return true
		end
	end
	return false
end

local tileYields = {
	YieldTypes.YIELD_FOOD		,
	YieldTypes.YIELD_PRODUCTION	,
	YieldTypes.YIELD_GOLD		,
	YieldTypes.YIELD_SCIENCE	,
	YieldTypes.YIELD_CULTURE	,
	YieldTypes.YIELD_FAITH		
}

then alter wherever we loop through yields (lines 225, 610, 805):

PHP:
for yield in GameInfo.Yields() do
	if Contains(tileYields, yield.ID) then
		-- do stuff
	end
end

It shouldn't affect your project, and will avoid checking new yields the core game functions can't handle. The problem is core functions like plot:CalculateYield(yieldID) don't do safety checks like these. I think that's all that is necessary to make our projects compatible. I've been using them together for about a month now. I'll redo my edits with the latest version of your project and check for other compatibility notes. I really like your work. :)

One tip to make it easier to adapt your project to future patches: if you can keep changes limited in a file, put a simple line like "--modchange" before each area you make changes. This makes it easy when comparing patch files to tell the difference between what Firaxis changed and we changed.

Another tip is Firaxis writes their code poorly in many places, but it's best to leave that alone. They have inconsistent variable names for example. They might use "pCity" in one place, "city" in another, and "g_city" in another. It's frustrating to work with, and I used to fix these mistakes. It unfortunately just made it harder to adapt to patches, since file comparisons spit out more mismatches.

Sometimes it's not possible to do what you want with just a few small edits. When this is true, I abandon the goal of of easy adaptation and just rewrite the whole file. I did this for one or two things like InfoTooltipInclude.
 

Attachments

Hello Thalassicus

the change you suggest would make EUI incompatible with mods which do add new yields while providing corresponding functionality...

And yes I agree with keeping changes limited, the only files which I have redone extensively are PlotHelpManager, InfoTooltipInclude, CityBannerManager, TopPanel, and NotificationPanel. All of the others only have more targeted modifications.
But as you may have noticed, there is only one code version for all game versions (bnw/gk/vanilla). This has made life so much easier for me, there is no turning back !

Happy holidays
 
Really nice job on this. I have a few suggestions:

1. Can you allow access into the diplomatic overview from the trade screen? One of my biggest gripes with Civ5 is when an AI pops up during their turn and wants to be friends or declare war on someone, and I can't remember what the diplomatic situation is. This is especially so when coming back to a save game from over a week ago. Sadly I can't play everyday and keep the specific game diplomacy fresh in my head.

You could do this in Civ4 by using the function keys. Actually you can bring up any info screen in Civ4, and while this request is centered around the diplomatic overview, having access to all the function screens would be nice.

2. You're already introduced overlays by optimizing the city hovers to actually show the boundaries of each city, and what tiles are being worked (you saved me eyes from certain doom). The BUG mod for Civ4 had a dot-mapping tool which was an easy visual way to plan for city placement. In Civ4 terms it was basically a big-fat cross (BFC) that would show the outlines of the first border expansion and show you what a city would wind up with for workable tiles. You could stamp as many of these as you wanted on the map and they would remain until removed (saved with the game).

In Civ5 terms, having an outline or overlay that was 3 hexes in every direction would be really nice, since I'm constantly counting hexes to figure out the optimal location to reach the most resources. I've had to do this multiple times since I can never remember where cities were going to go between game sessions.

3. On the leader screen and your ribbon you have cues to what the overall diplomatic standing is (i.e. friendly, guarded etc.). The leader screen clearly says it, and the borders on your ribbon I believe are the colors of the stance. Your mouseover shows the diplomatic modifiers, but not the overall stance. This isn't an issue unless you're bringing up the mouseover information by hovering over a foreign city, which is my personal preference.

4. Can you add a Civ's power rating to the leader mouseover information as well (i.e. inferior, weak, strong)? Should be the same information that prompts the numerous screens from the diplomatic adviser. There's already so much useful information there, it only makes sense to me to include this.
 
I just tried this again with the latest versions of both this and communitas and everything seemed to work until I tried to select a new tech and I couldn't select a new tech choice. Any ideas how to make them work. I didn't edit anything in Thal's Mod. Do I need to remove something or tag it out?
I have tried this before by itself and think that it is excellent, but I also like all the improvements Thal has made. Thanks!!
 
Deleted - It posted same post twice. I don't know what is going with the forum, but it is acting real crazy today.
 
When using the file Thal provided terrain tooltips completely dissappear for me. What could have went wrong? I used no other mods, only the full Commintas package.
 
Another bug happening in mod-less single-player as well (and has nothing to do with Communitas):

When I hit "Save Game" or "Options" in the main menu, nothing happens. If I then click "resume game", I'm in the options or save menu.

The bug is noncritical, however, just a bit confusing.
 
1. Can you allow access into the diplomatic overview from the trade screen?
I was thinking of making the civilization ribbon visible inside the trade screen. Also there are good third party mods such as "Global Relations", a light version of "Info Addict" which IMHO gives away too much information
2. introduce overlays ... to plan for city placement
Something I could do is when a settler is selected, a shadow of the 3-ring city print appears around the plot being moused over. Border growth is more organic in Civ V than it was in Civ IV...
3. the leader mouseover shows the diplomatic modifiers, but not the overall stance
Yes this needs to be added !
4. add a Civ's power rating to the leader mouseover
I have this policy of not adding information not already available somewhere else in the game. Is this already available / or can be inferred from somewhere else, if so where ?
with this and communitas I couldn't select a new tech choice. Any ideas how to make them work
Try removing the "Tech Tree" module from the EUI DLC. If Communitas makes changes to the tech tree, these will overwrite the EUI DLC's modified logic for tech selection...
When using the file Thal provided terrain tooltips completely dissappear
There is likely a coding error, please ask Thal
when I hit "Save Game" or "Options" in the main menu, nothing happens. If I then click "resume game", I'm in the options or save menu
Are you sure no other mods are active ?
 
Thx for the suggestion, but it didn't help. Since I'm the only one with a problem, I'll try reinstalling the game and using only your mod on a fresh install, maybe this helps with the Communitas problem as well.

As I said, it's only one additional click if you know how to handle it.
 
Thx for the suggestion, but it didn't help. Since I'm the only one with a problem, I'll try reinstalling the game and using only your mod on a fresh install, maybe this helps with the Communitas problem as well.

As I said, it's only one additional click if you know how to handle it.

You are not. I have seen the same yesterday when trying this mod for the first time. I use CivWillard and Global Relations, both mods are savegame compatible and "harmless", do not conflict with this one, so I doubt they have anything to do with this problem.
 
No modded BNW here, and also Save Game and Options seems to be unresponive until you press Return to The Game.

It's non critical, Return to Game fixes the issue until you press.. esc.. again.

ANYWAY,

Is the aim of this 'mod' only to improve User Interface, I would love if you could somehow add "pins" to maps, also, would you be able to give unreachable hexes (beyond the 3 radius) a speciifc color so i know that the city cannot work that tile?
 
It's not critical but I'd like to fix this bug...
Are you using Windows 8 or touch interface ? (then problems like this are to be expected)
Would you have an lua.log I could take a look at ?

@TheKingOfBigOz: what do you mean by "add "pins" to maps" ? And yes it's possible to "paint" unreachable hexes, but would'nt your map look outright ugly ? Plus doesnt the city view already fill this role ?
 
It's not critical but I'd like to fix this bug...
Are you using Windows 8 or touch interface ? (then problems like this are to be expected)
Would you have an lua.log I could take a look at ?

@TheKingOfBigOz: what do you mean by "add "pins" to maps" ? And yes it's possible to "paint" unreachable hexes, but would'nt your map look outright ugly ? Plus doesnt the city view already fill this role ?

Win 7 x64 here. I don't think it's OS related.

I have seen a similar behaviour when I was fine adjusting Global Relations; I remember the cause was some missing/misplaced calls to the ShowPopup or PushModal functions somewhere, so you may look at that first, specially if you used those functions somewhere when you modified some of the base game files for the mod. Or some ShowHide function not working or modified...
 
It's not critical but I'd like to fix this bug...
Are you using Windows 8 or touch interface ? (then problems like this are to be expected)
Would you have an lua.log I could take a look at ?

@TheKingOfBigOz: what do you mean by "add "pins" to maps" ? And yes it's possible to "paint" unreachable hexes, but would'nt your map look outright ugly ? Plus doesnt the city view already fill this role ?

1. Although I now play normal Civ 5 regulary, I do enjoy Hotseat games and I often get sidetracked controlling 10 civs, so being able to plan out, say, Spain finds a Natural Wonder, I add a pin near Uluru so I know where to place the next city.

2. As far as I know the "orangeybrown" tiles are the territory of a city, but it there is no clear indication that the tile is TOO far away to be worked when hovering over a city.

3. The city view DOES it, but this is more for workers, so I don't have to count out the tiles myself to see, I could just hover over the city.

Btw, I LOVE this mod, it's the quilivent of BUG in my opinion.
 
Thanks bc1, your recommendation to fix the problem of selecting a tech worked for me.
I'm having the same problems with the tooltip as Tomice.
I've also seen the same minor bug as mentioned above, this was even with only your DLC active.
 
1. Although I now play normal Civ 5 regulary, I do enjoy Hotseat games and I often get sidetracked controlling 10 civs, so being able to plan out, say, Spain finds a Natural Wonder, I add a pin near Uluru so I know where to place the next city.

One of the features I truly miss from Civ IV is the map notes. I used to make notes all over the map for placing cities, where a garrison unit being constructed was heading, etc. all so if I was away from the game for a prolonged time I could quickly re-orient myself as to what I was doing.
 
Back
Top Bottom