1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

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

Discussion in 'Civ5 - Mod Components' started by csebal, Oct 1, 2010.

  1. csebal

    csebal Chieftain

    Joined:
    Jun 19, 2005
    Messages:
    25
    Edit 21st June 2011:
    It became clear that I will not be returning to CIV5 for a good while due to shifting priorities and other factors. As such, this mod will not be developed any further in the forseeable future. Feel free to use any parts of it for your own work, but there really is no need to post changes/fixes here anymore, since I will not be updating the mod anyway.

    Maybe one day, even though I hope that there will be no need for such trivial UI modifications as this one at that later date. :)

    Peace, <3

    csebal out.

    Extended Plot MouseOver Popup

    While this mod is merely the result of a lab accident mixed with a healthy amount of stubborness, it turned out to be decent enough (or so I think) to be made public.

    Enjoy.

    Download:
    From the ingame mod browser. Name is "CsebMod - Extended Plot MouseOver Popup (v. 2)"

    Screens:


    What the mod does:
    ++ It alters the original plot information popup in several ways:
    - Reordered the layout a little
    - Added the defense modifier given by terrain and improvements
    - Improvements being built are shown in yellow with the remaining time displayed next to them
    - Resource information now shows the neccessary improvement as well
    - Updated the yield display to show resources / happiness provided by the tile
    - Added a yield preview section where I list all available (limited by technology) improvements and the yields the plot would provide with them.
    ++ Removed the plot information panel originally displayed in the bottom right corner, as i did find that both redundant and badly placed (more often than not, the various turn event notifications were overlapping / blocking parts of the information there)

    Version history:
    -- V1: Initial Release
    -- V2: Some minor bugfixes, Changed it so the yield predictions only show when alt is pressed

    Save games:
    Since this is purely a LUA modification, it can be applied to running games. I really strived to make it as general as possible, so it should be kinda compatible with other mods that add/change resources and improvements, but I wasn't able to test it extensively, so there are no guarantees. If you find a bug, let me know and I will try to squish it.

    Compatibility:
    The mod is compatible with other mods unless they change the PlotHelpManager.lua or PlotHelpText.lua files.

    To other mod makers:
    - If you want to use parts of the mod, or the mod as a whole, you are allowed to do so, on two simple conditions.
    1) (you do not have to do this anymore, see update) If you fix a known or not yet discovered :) bug in the mod, you let me know so the fix can be included in this version as well.
    2) (you do not have to do this anymore, see update, although i will not mind getting my ego stroked a little every now and then) You give credit where it is due.

    Also if you need any help with how the mod works / what it does and why does it do it, you can PM me and I will try to help. (I might not read your PMs for months but hey.. worst case scenario, i will not be able to help ya)

    - If you want to translate the mod to other languages, you can do so by updating the TextChanges.xml file in the mod. Once you are done, post the file here or send it in a PM and I will include it in the next version of the mod. (not likely to happen.. see update)

    Known issues:
    - Yield predictions might be off when you look at plots outside your culture. This is caused by a weird behavior of the CIV5 API function i use to get the modified plot yields so there is no telling when/how i will be able to fix it. I haven't seen any anomalies with the vanilla game but working on my yield mod caused this bug to pop up. So if you use modded tile yields, do not be surprised if you see some anomalies. Yield predictions do seem to be correct for plots inside your borders (which is where you can build most of the stuff anyway).
     

    Attached Files:

  2. Baleur

    Baleur Prince

    Joined:
    Jul 9, 2010
    Messages:
    526
    Location:
    Qingdao, China
    I absolutely LOVE this, but i have one tiny request, a version without the bottom "With Fort" etc preview yields, it confuses my eyes a bit :(
    And i love that you removed the little tooltip stuck above the minimap, highly redundant :)
    Edit, oh and the fresh water and defence modifier indicator is a godsend.
     
  3. Whys

    Whys Between the Lines

    Joined:
    Oct 20, 2007
    Messages:
    456
    Nice work, but I do agree with Baleur, the 'with/without' info is TMI. Would be nice if it showed up in debug mode however. :)
     
  4. marekb

    marekb Warlord

    Joined:
    Jun 4, 2006
    Messages:
    229
    Very nice mod. A small bug: in the place of removed plot information I got "Help text!":
     
  5. Baleur

    Baleur Prince

    Joined:
    Jul 9, 2010
    Messages:
    526
    Location:
    Qingdao, China
    marekb yeah you can see it in his example screenshot too, hidden behind the tooltip :D
     
  6. csebal

    csebal Chieftain

    Joined:
    Jun 19, 2005
    Messages:
    25
    V2 is up for grabs. Enjoy.

    If you notice any anomalies / problems, just let me know.

    Good catch.. I guess packing things up at 6am in the morning is not a good idea after all :) I should have noticed this myself. Anyway, it is fixed now.

    I hear ya.. V2 now only shows the yield predictions when you have the alt key pressed.
     
  7. HourlyDaily

    HourlyDaily Man-o-Mercy

    Joined:
    Sep 20, 2004
    Messages:
    507
    Location:
    Melbourne, Australia
    Great work. Absolutely no reason for this not to be in the vanilla game.
     
  8. mattpilot

    mattpilot Warlord

    Joined:
    Jan 29, 2004
    Messages:
    184
    looks awesome!


    Can you please post a download link here aswell? Mod browser doesn't work after 10 seconds and i can't find yours on the first page :/.
     
  9. csebal

    csebal Chieftain

    Joined:
    Jun 19, 2005
    Messages:
    25
    There ya go, attachment in the first post.
     
  10. mattpilot

    mattpilot Warlord

    Joined:
    Jan 29, 2004
    Messages:
    184
    Thanks.

    But aren't there a few files missing? :/

    or is that a modbuddy file?


    I guess what i was asking for is a zip of the final mod folder you find in ->

    X:\Documents and Settings\*********\My Documents\My Games\Sid Meier's Civilization 5\MODS


    The "installed" version, if you will. Kinda like 'balance - combined' release.


    <3
     
  11. Szpilman

    Szpilman Void Co. Chairman

    Joined:
    Dec 2, 2006
    Messages:
    746
    Location:
    Cola
    Looking good :goodjob: And I agree with the others, less is more.

    It is actually a zip file, .7z to be specific. Just rename the .civ5mod extension and unzip with 7zip.
     
  12. csebal

    csebal Chieftain

    Joined:
    Jun 19, 2005
    Messages:
    25
    You just copy the file into your mods directory. On the installed mods tab, there will be an "install mods" button (the same one you get after downloading a mod from the browser). Click that, and the game will extract the civ5mod file into the proper mod directory allowing you to enable / disable it via the usual ways.

    Optionally, you can extract it yourself. civ5mod files are in reality "7zip" packages with a different extension.
     
  13. mattpilot

    mattpilot Warlord

    Joined:
    Jan 29, 2004
    Messages:
    184
    Thanks! Got it to work. Awesomesauce.
     
  14. CyberTyrant

    CyberTyrant Emperor

    Joined:
    Jun 19, 2002
    Messages:
    1,261
    Gender:
    Male
    Location:
    Wisconsin, USA
    Thanks, csebal. :goodjob:
     
  15. Whys

    Whys Between the Lines

    Joined:
    Oct 20, 2007
    Messages:
    456
    Actually, there is one reason. The base game is a rolling start that has intentionally left small gaps such as these so as to save time by letting modders do it instead. At some point in the future, Cid will package the most logical and best designed UI mods into an update for the base game.

    The mod cloud works for free. :)
     
  16. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    csebal, would you mind if I include this in my mod? I ask for a few reasons:
    • This requires modification of core files, so if I ever modify them myself it becomes incompatible.
    • It deserves to be in the core game, and I'm using my mod as a test bed for things I'm recommending to devs.
    • I was going to do the same myself, easier to use yours. :lol:

    If you say no, that's fine. ;)
     
  17. csebal

    csebal Chieftain

    Joined:
    Jun 19, 2005
    Messages:
    25
    Sure, go ahead. Should be easy enough to integrate as i kept my stuff in separate files and everything is heavily documented in comments.

    Some mod development notes:
    Spoiler :

    I figured out the reason for the outside borders yield bug by the way. To get a plot's yield with a specific improvment, i use the function:

    plot:GetYieldWithBuild(iBuild, pPlot, bDebug).

    Now this works fine and all if called on a plot within your culture, but if you call it on one that is outside of your culture, then several things happen:
    1) The yields for the improvement are calculated as if you would have every tech / policy. I'm guessing that the function tries find the player by plot ownership when looking for tech based modifiers and when it finds no players, it defaults to having everything..
    2) The resource bonuses (both the base resource yield and also the improvement-resource modifiers) are completely ignored. (I have a fix for that in the code by looking up the values in the proper tables an applying them manually)

    The reason i didnt see the problem in vanilla game is that it only has a few (and small) tech / policy based yield modifiers, whereas my other mod has lots of those.

    It can be fixed, but requires me to go through the tables and manually add up the values to get proper yields. Maybe I'll do that.. eventually.. unless they fix the API first, which - to be honest - is highly unlikely. I just with we would have a proper reference manual of the various API functions.. would make life soooo much easier.
     
  18. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Awesome. :goodjob: There are a few other interface mods that I'm simply doing myself (minor things), but this one is quite in-depth, more than I'd do on my own. Very nice work. :goodjob:

    And yes, a reference would be EXCELLENT. :crazyeye:
     
  19. ByblosHex

    ByblosHex Chieftain

    Joined:
    Oct 2, 2010
    Messages:
    42
    Great mod. Thank you very much for making this. :)
     
  20. kyubichan

    kyubichan Chieftain

    Joined:
    Sep 24, 2010
    Messages:
    2
    I would like to upload a translated spanish version. Maybe is possible a multi-language version.

    Awesome mod anyway. Thank you.
     

Share This Page