1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

List Enhancements for VP

Discussion in 'Mods Repository' started by adan_eslavo, Nov 17, 2018.

Tags:
  1. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    The mod is indispensable, it replaces City List and Unit List in my interface options as seen in screnshot attached. I also like the new grid layout, it clearly defines each column!

    I noticed recently that when working tiles, in my recent game the number of turns remaining building roads (1) isn't in sync with the tooltip onscreen compared to LE. Do you notice the same thing?

    The contents within the window occasionally flicker during turn sequence, does it only update once after turn completion or each time it has new information?
     

    Attached Files:

    Last edited: Dec 24, 2018
  2. adan_eslavo

    adan_eslavo Archmage of all Pixels Supporter

    Joined:
    Apr 23, 2017
    Messages:
    2,692
    Gender:
    Male
    Location:
    Łódź, Poland
    Do you play on full HD? Oh, on my 1366x768 resolution it takes much of the screen...
    I will look on code, maybe I will find reason. What aboutrest of improvements? Same issue like with roads?
     
  3. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    Yes, I play Full HD on my laptop 1920x1080. It is also the resolution that Sukritact's Main Menu uses for all his added background menu files.

    I loaded a new game to see if the results for the improvements would be the same.

    For the worker chopping jungle, it shows tooltip 5 turns while LE shows 4. On the other worker, it shows tooltip 9 turns while LE shows 8. So, the numbers aren't matching.
     

    Attached Files:

  4. adan_eslavo

    adan_eslavo Archmage of all Pixels Supporter

    Joined:
    Apr 23, 2017
    Messages:
    2,692
    Gender:
    Male
    Location:
    Łódź, Poland
    @Infixo uses same code in MO, and I saw on lua help tht the same code is used in vanilla. Recent VP changes?

    Code:
    local iTurnsLeft = unit:GetPlot():GetBuildTurnsLeft(iBuildType, 0, 0)
    I would swear I checked this and it was ok. I just checked unfortunately those which were right. Why? Look at this:
    upload_2018-12-25_12-38-40.png
    As you can see everything look right. But on next turn...
    upload_2018-12-25_12-40-20.png
    Lag???

    It shows good result only on first turn (when you start working on an improvement). I suppose it is vanilla/VP issue. I can add simple +1 to the code but it do not resolve the problem totally.
     
    Last edited: Dec 25, 2018
  5. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    This might be a bug in the game engine possibly. Is it seen in original list enhancements code?

    @whoward69 Hello kind sir, I apologize for summoning you but I was hoping you might be able to shed some light on this anomaly.
     
    Last edited: Dec 26, 2018
    adan_eslavo likes this.
  6. psparky

    psparky Prince

    Joined:
    Feb 24, 2011
    Messages:
    588
    Gender:
    Male
    The reason the interface still shows 4 turns remaining is because the worker effort for this turn has not yet been committed - you could still move the worker to another job. If you click on the build camp action button it will be committed and the number in the worker panel will go to 3. I don't know how you calculated the number shown in the list but perhaps you should compare it with the code in the EUI UnitPanel, as it would be better if they are consistent.

    As an aside (for general interest) it's often useful to click to commit when only one turn remains as you may be able to take advantage of the completed task on the same turn, rather than waiting until the next. Some examples include completing a road so another unit can move faster, connecting a luxury to sell a turn earlier or a resource so you can start work on the unit or building that needs it one turn earlier. With this in mind, I sort the EUI unit list by job turns remaining for workers, and have only workers selected in the early game or in other situations when micro is most valuable.
     
    vyyt, ryanmusante and Infixo like this.
  7. adan_eslavo

    adan_eslavo Archmage of all Pixels Supporter

    Joined:
    Apr 23, 2017
    Messages:
    2,692
    Gender:
    Male
    Location:
    Łódź, Poland
    I decided to release v5 in its current state. It should be somewhat stable, but if you can see bugs, just point it out. I'm busy now with some other things so nothing major will come out soon. I still have plans for rest of my mods (especially PO, TO and ACN), but they are stable versions, too so there's no rush.
    Code:
    v5:
    - unit list:
        - set unit name instead of unit type,
        - added tooltip to unit name ==> shows CS and RCS/Range statistics for military units; shows current health/max health (percent health),
                                     ==> shows spreads left for religious units,
                                     ==> shows helpt text.
        - health bar now shown under name,
        - added alternative sorting method for name: by health,
        - status: ==> worker status now shows improvement and turns left instead of static word,
                  ==> caravan status now shows turn left to finish the trade route,
                  ==> if unit is garrisoned status shows what is its current state,
                  ==> if unit is garrisoned status tooltip shows in which city, or if in fort or citadel - near which city,
        - xp: ==> value coloured if unit reached 75% (yellow) or 100% (green) xp needed to next level,
              ==> xp tooltip now shows current unit promotions instead of repeating the info,
        - upgrade tooltip now shows CS, RCS, Range and Help text for possible new unit.
    - city list:
        - fixed sorting
        - rearranged columns,
        - added culture bar,
        - added defense value and merged it with icon showing if city attack is possible; added tooltip,
        - clicking on icon for city attack zooms to city,
        - reworked city name and health bar; now longer names, health bar moved and aligned to the left,
        - added marker if city has garrison,
        - added tooltip to name: ==> shows yields,
                                 ==> current health/max health (percent health).
        - added city connection icon under unhappiness value.
        - added additional sorting method for population (population number/growth), production (production turns/name) and name (also by health),
        - modified tooltips for population, culture and production,
        - added resource demand with WLTKD counter.
    - added grid colours,
    - alignement issues fixed,
    - lowered main font,
    - text revision,
    - code cleaning.
    Happy New Year CivFanatics!
     
    Last edited: Dec 31, 2018
  8. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    I'm receiving crashes on AI turns and sometimes after selecting "automate" on unit moves when I have list enhancements screen for Units selected.
     
  9. civplayer33

    civplayer33 King

    Joined:
    Sep 11, 2017
    Messages:
    965
    Since adan_eslavo is currently not keeping this up to date anymore (I posted an issue to his github, but no answer) I'll just post a little update for this mod here; it fixes an issue that VP has introduced by changing the way Unhappiness is calculated and "described" in the UI, which had broken the Happiness info in the City List.

    Enjoy.
     

    Attached Files:

    ryanmusante and Kim Dong Un like this.
  10. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    Thanks for the update. Do you notice any issues with having the mod onscreen during AI turns?
     
  11. civplayer33

    civplayer33 King

    Joined:
    Sep 11, 2017
    Messages:
    965
    Haven't tested that. What's the issue?
     
  12. civplayer33

    civplayer33 King

    Joined:
    Sep 11, 2017
    Messages:
    965
    I'll publish another update, but this one is totally optional (no bug fixes or the like).

    Basically I added functionality to modify the Tech Panel (it's selectable as the top item in the same menu, which is called the InfoPanel, as all the lists this mod modifies); what annoyed me for a long time is that while I liked the idea of having the items that are part of the tech being researched on the main screen (for quick check of values in the tool tips and so on), I didn't like the big tech image, especially since it's completely redundant, along with the Tech Meter, since those can be seen in a smaller version literally like 1 cm further up and, by simply mousing over that smaller tech icon in the Top Panel, one can see the exact same big version as the vanilla Tech Panel shows (but the Top Panel one even has additional information, namely a visual indicator for the turns between which the tech will be researched). So what I did was remove the tech image and Tech Meter from the Tech Panel, changed layering a bit and made it so the space taken up by the Tech Panel is as small as possible (more or less).

    The only issue is that UnitPanel.lua, which is a file modified by many different mods, includes code at line 2371 that uses integers to set the Y-offset of the EUI city stack, depending on what InfoPanel is being shown (it's hardcoded). This means that one will have to either live with the fact that there will be a gap between the InfoPanel and the first city of the EUI city list, as shown below in the screenshot (gap is indicated by red arrows), or the mod will have to modify UnitPanel.lua, which makes it more likely that it will need to be updated, because mods like PFEUI4VP or VP itself can make updates to UnitPanel.lua, and it also means that now you have to think about what UnitPanel.lua to include in the mod (e.g. VP's version or PFEUI4VP's version), which makes things more complicated.

    Tech_Panel_EUI.jpg

    So I'll publish three updates, all of which are optional, as I said; all versions will make the Tech Panel much smaller, as you can see in the screenshot, but the first one will not eliminate the gap you see in the screenshot (only happens if the Tech Panel is shown) and is the only non-EUI compatible version, while the second one will modify UnitPanel.lua to eliminate the gap and will be the VP-EUI-compatibility version (do NOT use with PFEUI4VP !!!) and the third version is the VP-PFEUI4VP-compatibility version (use with VP and PFEUI4VP). So, to summarize:
    • First file (no "zzz" in file name): use with VP, with or without EUI, and don't worry about updates or other mods like PFEUI, but live with the gap if using EUI (while the Tech Panel is shown)
    • Second file: use with VP (EUI), no gap, but requires VP-EUI and can't use any other mod that modifies UnitPanel.lua (like PFEUI)
    • Third file: use with VP (EUI) and PFEUI4VP, no gap, but can't use it with VP-EUI only or VP (no-EUI) or other mods that modify UnitPanel.lua
    Seems like way more effort than it's worth, I know, but this was actually a nit pick for me for a long time and when I started implementing it I didn't realize that these problems would come up...anyway, I hope everyone understands how to use this and if not...just don't :lol:
     

    Attached Files:

    Last edited: Dec 9, 2019
  13. civplayer33

    civplayer33 King

    Joined:
    Sep 11, 2017
    Messages:
    965
    Forgot to add: no, so far I haven't noticed any issues with that, including when leaving the Unit List onscreen during AI turns.
     
  14. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    Ok, so to be safe, use the First file (no "zzz" in file name)? I suppose it's the general all-purpose one?
     
  15. civplayer33

    civplayer33 King

    Joined:
    Sep 11, 2017
    Messages:
    965
    Yes, though if you don't really care about the size of the Tech Panel you may as well just skip this update entirely...it doesn't do anything else compared to version 5.1
    I made this mostly for myself and then thought I'd share on the off-chance anyone else had the same nitpick.
     
  16. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    It's great, even small changes like this are QOL.
     
    civplayer33 likes this.
  17. adan_eslavo

    adan_eslavo Archmage of all Pixels Supporter

    Joined:
    Apr 23, 2017
    Messages:
    2,692
    Gender:
    Male
    Location:
    Łódź, Poland
    Hi, folks! Sorry for inconvenience, but many other side projects and RL issues took me from truck and now when I see how many things has changed in VP and MUCfVP I got a headache :) If you want and feel such need feel free to post and update or even continue my work. I won't lie to you I will be back to modding civ5. Just maybe. I am happy that my works (based on other people's works that also retired from modding) are so popular. Good luck guys.
     
    Last edited: Jan 5, 2020
  18. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    So you will be back to modding? I hope so. We miss you, brother.
     
  19. adan_eslavo

    adan_eslavo Archmage of all Pixels Supporter

    Joined:
    Apr 23, 2017
    Messages:
    2,692
    Gender:
    Male
    Location:
    Łódź, Poland
    @ryanmusante Depends. I felt bad with unfinished job...
    • I will probably pass MUCfVP. @pineappledan handles it perfectly and I'm proud he keeps our baby alive, but he has increasing number of mods to maintain, so if he needs any help I can do something. But nothing big.
    • @Asterix Rage suggested me to take Wonders Expanded which I use and is one of my favourite mods. It's big, so for now I will also pass it. For now. Later, maybe?
    • I want to finish Promotion Overhaul. That's my priority. I left it broken and unfinished half year ago, and now it is at least working. Next will be small revision and start with compatibility patches.
    • Alternative Components Name... I need to finish it too, but it's tough. It would be good to have someone as a tester. I made spreadsheet with all new city names, new leader names. Few nations are not programmed. There's broken suffix "The Great" I want to get rid off. There's problem with sorting, it works, but not for modded civs. So looots of work.
    • Rest of mods is rather finished. I mean CSL, WP, TO, LE, MC, C+++ and FRU. That's why I asked for your expercience. Maybe small tweaks can be given to improve some issues. If you have such, do some screens if you can.
    So to summarize: 1st - PO and small tweaks to existing. Then ACN and later maybe WExpanded.

    @ryanmusante Do you know if worker turn bug is still active? I mean that described few post earlier?
     
    Last edited: Jan 4, 2020
    Kim Dong Un and ryanmusante like this.
  20. ryanmusante

    ryanmusante Emperor Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,149
    I have placed list enhancements back into the folder. I'll do some testing as soon as next version of VP is released.
     

Share This Page