• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

CsebMod - Extended Plot MouseOver Popup [V2] (UI)

Nice mod, I like it. I would prefer though to see (when pressing Alt) the yields from all possible improvements for that hex and the names of the techs required to get them in the future. With all the new values in civ 5 plus new mods, I find it a bit confusing to know exactly what to do with all hexes.

Well, i still have two modifier keys left, so i can include the option to show even more info when you press shift and alt at the same time. My original concept was to show everything possible, but there are quite a lot of improvements even in the vanilla game and the list did look bloated and less than useful, so i decided to go with those that you can actually build based on available tech.

Obviously even that was too much info for some, thats why it ended up being hidden by default :)

Problem. When I hit alt to see the 'with/without' info in the tooltip, it shows me "with farm" even though I can not build a farm on a desert hill.

I really like the use of the alt key. Good thinking.

You sure you can't? You can build it on desert (i think, even though my recent games with the modded version i use might distort my memories there a little) and you can also build it on hills, as long as the hills have fresh water (this one i am sure of). So being able to build on desert hills seems to also be possible, as long as there is fresh water next to the tile. River or lake or.. well, i have seen tiles with fresh water that had no appearent fresh water features near them.. but thats besides the point here. Did you actually check to see, if you can build there?

Hey csebal, Liek this mod alot, was wondering if you mind if I include it in a mod im making?

See first post for info on that.
 
What I can say for certain is that the tooltip alt info shows me "with farm" but when I move a worker there to build one, "farm" is not a build option. Both times I noticed it, it was on a hill. I tested it as an exclusive mod.
 
What I can say for certain is that the tooltip alt info shows me "with farm" but when I move a worker there to build one, "farm" is not a build option. Both times I noticed it, it was on a hill. I tested it as an exclusive mod.
Thanks for the info. I will look into it. Does the hill in question have fresh water by any chance? If it does, then there might be a flaw in my observations on how fresh water interacts with the tile. If it does not however, then the function determining improvement availability is just plain broken :)
 
Is there any chance for a super-mini version that does nothing but just remove the tooltip above the minimap?

you just have to isolate csbmod_extplotinfo_PlotHelp.lua

change the .modinfo file section to look like this:
Code:
  <Files>
    <File md5="D45711CDDDCFB906C9A465A2F6A13EEE">csbmod_extplotinfo_PlotPopup.lua</File>
  </Files>
and remove this:
Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>TextChanges.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>

you can even change the name to reflect your changes in the mod browser

Code:
  <Properties>
    <Name>No ToolTip</Name>
    <Stability>Beta</Stability>
    <Description>no tooltip</Description>
    <AffectsSavedGames>0</AffectsSavedGames>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>1</SupportsMultiplayer>
    <SupportsMac>1</SupportsMac>
    <ReloadLandmarkSystem>0</ReloadLandmarkSystem>
    <ReloadUnitSystem>0</ReloadUnitSystem>
  </Properties>

when you're done, save as notooltip.modinfo and put notooltip.modinfo and csbmod_extplotinfo_PlotHelp.lua into a new file (MODS/No Tooltip/)you should be good to go!

edit: what am i doing wrong? why can't I upload a .modinfo?
 
Thanks, got it XD
Just didnt realize which file that specific tooltip was in :)
Edit: for some reason, it wont work ;o The mod loads properly ingame (i think), but no visible change..
 
Thanks, got it XD
Just didnt realize which file that specific tooltip was in :)
Edit: for some reason, it wont work ;o The mod loads properly ingame (i think), but no visible change..

Actually, for it to work, you have to have the original lua file modified as well in the mod. So two files are needed.

PlotHelpText.lua
and
csebmod_extplotinfo_plothelp.lua

just package these two into a separate mod, and you should be good to go.

Alternatively, you can take the original PlotHelpText.lua and change OnMouseOverHex to only contain what you see below:
Code:
function OnMouseOverHex( hexX, hexY )
	Controls.TextBox:SetHide(true);
end
That way, all you need is the single modified PlotHelpText.lua in your mod and - again - you should be good to go.
 
Thanks for the info. I will look into it. Does the hill in question have fresh water by any chance? If it does, then there might be a flaw in my observations on how fresh water interacts with the tile. If it does not however, then the function determining improvement availability is just plain broken :)

I've done some more testing -- running your mod exclusively -- and building farms on any hill, be it grassland with fresh water, or anything else, is not allowed. I assume that is the rule for the base game. Your mod shows 'with farm' on hills anyway. Hills with resources however do not show 'with farm', appropriately. Also, the city plot shows the extra info, but obviously, improvements on a city plot are not possible.

Hope this helps.
 
I've done some more testing -- running your mod exclusively -- and building farms on any hill, be it grassland with fresh water, or anything else, is not allowed. I assume that is the rule for the base game. Your mod shows 'with farm' on hills anyway. Hills with resources however do not show 'with farm', appropriately. Also, the city plot shows the extra info, but obviously, improvements on a city plot are not possible.

Hope this helps.

I most certainly appreciate the effort. As for the farms on hills issue.. im quite sure you can build those in the vanilla game, as i have built them well before there were any mods out for the game :) In fact i was quite surprised when i realized that fresh water makes building farms on hills possible. Then again, they released a few patches since then, and i havent updated my game in a while (stupid steam only updates when it is restarted and i tend to have my system running non stop), so i guess i will have to see if they made any changes in that department.

The rest of the things you mentioned seem to be genuine bugs. I will fix them as soon as i get around to working on this.

Again, thanks for extensive testing.
 
Steam blows like a kettle.

An update corrupted my civ installation once and I had to reinstall. Then a video driver update from them forced civ into XP compatibility mode with the uncheck option disabled. Reinstalling didn't work and I had to fix it via regedit. It's all good now, but... seems like it's only a matter of time.

Anyway, great mod. I'm only pestering you about it because I think it wants to be a perfect mod. Then it shall live forever. :)
 
Hello
I make the translation for French Version of the game
Thanks a lot for this mod, very usefull
Maybe you can modify the first page and link all versions allready done
Regards
Yoda49

I will most definitely do that, but i have been doing 14-15 hours workdays for the last week so i havent really had any time left to play let alone mod civ.

There's a few things on my todo list regarding the mod and amongst the first is the merging of all translations you guys made this far into the main mod.
 
What I can say for certain is that the tooltip alt info shows me "with farm" but when I move a worker there to build one, "farm" is not a build option. Both times I noticed it, it was on a hill. I tested it as an exclusive mod.

Checked out farms on hills. Vanilla game, only the extplotinfo mod was enabled.

2j10ab6.png


So it is definitely possible to build farms on hills, as long as they have fresh water. I will check out other terrain types as well, cuz there might be a difference how say desert hills behave in comparison of grassland hills.

I started to go through available lua functions to see if there are any that might be able to help me better identify build availability / calculate yields.. it might take a while, as there is no documentation whatsoever about the api.
It is like trying to hit a target, while..
..you are blindfolded..,
..you have no idea where or how far the target is in relation to you..
..or if it even exists.

Welcome to my world.
 
So bizarre. I tested this multiple times and got the same result. But today, I give it another look and now hills with fresh water will let me build farms. I don't get it. Also allows farms on desert hills with fresh water, so you are correct.

Come to think of it, when I loaded the game the first time today, I got a Steam popup that said my files were "out of sync", what ever that means. Must of resolved the issue, but I never did anything to put it out of sync in the first place.

*sigh* Steam... :P

Anyway, sorry for the false alarm.
 
So bizarre. I tested this multiple times and got the same result. But today, I give it another look and now hills with fresh water will let me build farms. I don't get it. Also allows farms on desert hills with fresh water, so you are correct.

Come to think of it, when I loaded the game the first time today, I got a Steam popup that said my files were "out of sync", what ever that means. Must of resolved the issue, but I never did anything to put it out of sync in the first place.

*sigh* Steam... :P

Anyway, sorry for the false alarm.


No probs at all. Better be safe than sorry :) Thats why i double checked it myself as well, despite being fairly sure of it.
 
Minor issue in an otherwise excellent mod:
Does not display "Turns Remaining:" for Remove X(forest/jungle/marsh)
idk if this is an oversight or a programming nightmare, just thought I'd mention it.
 
One request for you: Any chance you can add support for improvement upgrades?

As in, next to an improvement, have a string for what it upgrades to, and how many turns till it upgrades?

Edit: Well, I'm partially there. I just need to know the name of the function to call for the number of turns till improvement upgrade now. I've asked in the tester forums, so maybe I'll get an answer. :lol:

PlotHelp.png
 
Alright, got it all working. Making a second post just to be sure you see it, so you can include the code if you want to. :goodjob:

First, a screenshot... I'm open to changing formatting if necessary.

PlotHelp2.png



And now the code. It is all within the one function, and I'm not including the full thing. My additions are bolded, and highlighted.

Code:
function GetImprovementString(pPlot)

    local strResult = ""; -- result string        
    local iActiveTeam = Game.GetActiveTeam(); -- the ID of the currently active team
   [COLOR=Blue][B] local iActivePlayer = Game.GetActivePlayer(); -- the ID of the currently active player[/B][/COLOR]
    local pTeam = Teams[iActiveTeam]; -- the currently active team
[COLOR=Blue][B]    local pPlayer = Players[iActivePlayer];[/B][/COLOR]

    -- add the improvement already built on this plot
    local iImprovementType = pPlot:GetRevealedImprovementType(iActiveTeam, false); -- get improvement on the pPlot
    if (iImprovementType >= 0) then -- if there is an improvement, display it
        if (strResult ~= "") then
            strResult = strResult .. ", ";
        end

        local convertedKey = Locale.ConvertTextKey(GameInfo.Improvements[iImprovementType].Description);        
        strResult = strResult .. convertedKey;

        if pPlot:IsImprovementPillaged() then -- add text, when it is pillaged.
            strResult = strResult .. "[COLOR_WARNING_TEXT]" .. Locale.ConvertTextKey("TXT_KEY_PLOTROLL_PILLAGED") .. "[ENDCOLOR]";
        end

       [COLOR=Blue][B] local upgrade = GameInfo.Improvements[iImprovementType].ImprovementUpgrade;
        if (upgrade ~= nil) then
            local upgradeKey = Locale.ConvertTextKey(GameInfo.Improvements[upgrade].Description);
            local upgradeTurns = pPlot:GetUpgradeTimeLeft(iImprovementType, pPlayer);
            strResult = strResult .. " ([COLOR_POSITIVE_TEXT]Upgrades to: " .. upgradeKey .. " in " .. upgradeTurns .. " turns[ENDCOLOR])";
        end[/B][/COLOR]
    end
 
Back
Top Bottom