Plot List Enhancements by 12Monkeys (Ported to BUG by turlute. Heavily modified by EmperorFool)

 About Plot List Enhancement

The motivation for this mod was born when I tried to fiddle a unit stack with a large number of units. It was a frustrating experience, due to the strange behavior of the plot list and some bothering bugs in Civ4. So I started to create this mod here. It is a more or less complete reprogrammed plot list with a bunch of new features. Not all of the features may be used at one time, but I think everybody will find something hes looking for. It is based on the previous version of the Plot List Enhancement although is has been reworked completely. There is not much left except some graphics.

Features

1.) Enhanced Unit Buttons

2.) Unit Mouseover Changes

3.) Unit/group selection in the plot list

4.) Plot list display modes

5.) Unit filters

6.) Plot list grouping modes

7.) Plot list upgrade View

8.) Plot list promotion View

9.) Move highlighter

10.) Configuration

1.) Enhanced Unit Buttons

Each unit button provides you now with some additional information. This makes it easier to determine what status a single unit has, without selecting it first.

Following information is implemented :

  1. Health + Movement Indicator
    The colored spot changes depending on how many movement points are left:
The spot is displayed in a darker color, when the unit is wounded.
Also, if the unit is led by a Great General, the dot becomes a star.
  1. Health Bar
    At the top of each unit button, a horizontal bar is displayed. This bar indicates the remaining health points of the unit in percent. The colors of the bar can be changed. The default colors are green and red.
  2. Movement Bar
    At the top of each unit button, below the health bar, another bar is displayed. This indicates the remaining movement points of the unit in percent. The colors of the bar can be changed. The default colors are blue and grey.
  3. Mission Indicator
    In the lower right corner, the unit's mission is displayed with an icon. They are split into groups using their background: green for automation, yellow for defensive, red for offensive, light blue for movement and white for stationary actions. The following mission types are indicated (the background color is indicated in brackets) :
  4. Promotion Indicator
    A unit which can be promoted is displayed with a light blue frame in the plot list.
  5. Upgrade Indicator
    A unit which can be upgraded to any other unit, will get a small orange up-arrow in the lower left corner of its unit button. The arrow is displayed regardless whether you have the money for the upgrade or not.

2.) Unit Mouseover Changes

When you move the mouse over any unit button in the plot list, an info pane is displayed on the left side of the screen. This Info pane has been been modified in the following places : 

  1. Remaining Movement Points
    The remaining movement points of the unit are displayed as a floating value with 1 decimal
  2. Strength + Turns-To-Heal
    The current unit strength is displayed as a floating value with 1 decimal. In case the unit is wounded a third value is displayed in brackets. This number indicates the number of rounds the units need to heal completely under the current circumstances. This circumstances takes consideration of city building (like hospital), the unit's promotion (Medic, or any other promotion with self heal abilities) the promotions of units on the same or adjacent tiles, the territory the unit is on.
  3. Special Abilities
    The special abilities a unit gains due to a promotion are displayed in a different color than the specials it gains due to its unit type. The color can be modified in the ini file, the default color is light gray. 
  4. Experience
    The unit's experience points are displayed in the following format : <curr-exp>/<needed-exp>. Where <curr-exp> is the units current experience points and <needed-exp> is the units needed experience points to get the next higher level. Both values are only displayed if the unit has an experience value > 0. 
  5. Level
    The unit's level is displayed in the following format. : <curr-lev>/<possible-lev>. Where <curr-lev> is the unit's actual level and <possible-lev> is the level the unit could have due to its experience points. In other words : the first value shows the number of promotions the unit already has, the second value shows the number of promotion the unit could have. Both values are displayed, as soon as one of the values is > 0. 

Because this info pane has to be reprogrammed completely new, the layout differs slightly from the built-in one. There may also be some differences in the information I haven't documented here. If so, please contact me.  

3.) Plot List Selection 

The selection in the plot list has also been improved by eliminating some bugs of the Civ4 standard version :  

  1. Civ4 bug : when selecting a unit on the very right the plot list is rebuilt so that the selected unit is at position 10 in the plot list - fixed 
  2. Civ4 bug : under some special circumstances the scroll arrows did disappear - fixed 
  3. Civ4 bug : when selecting a unit with Alt-key pressed, all units should be selected. Because it is not possible to put units with different domain type into one group, always the first domain in the plot list is selected - fixed -  All units with the same domain type as the selected unit will be put together into a group.

The rest of the selection method is pretty much the same as before :  

*Remark made (see Appendix A, (i))

4.) Plot list display modes 

To improve the display of a large amount of units on one plot, I added some display modes.   These are now in cyclic format, so that it switches to a different view each time you click in this order: 

  1. Standard mode
    The units are displayed in one vertical line with scroll buttons on the right side. As already mentioned in chapter 3., the bothering bugs with the display have been eliminated.
  2. Multiline mode
    All units are displayed in several lines, so that there is no scrolling needed. The display starts in the lower left corner. Using this view, no scroll buttons are needed, except you have so much units on one plot, that the screen height is not enough to display them in multi line view. In this case, vertical scroll buttons (up and down arrow) are displayed. 
  3. Vertical stacks
    Dependent on the grouping mode (see chapter 6.) some units are displayed in vertical stacks. You can scroll left an right with the scroll buttons. In the unit type grouping mode, units of the same type are displayed in a vertical stack, in the selection group grouping mode selection groups are displayed in a vertical stack.
  4. Horizontal stacks
    Pretty much the same as the vertical stacks with the only difference, that the stacks are horizontal oriented. You may now ask what that is for. Two reasons. First: because of the different screen ratios this option may be better than the vertical stacks (you have smaller stacks, but more lines). Second : it was fun to do it ;) 

5.) Unit Filters

There are several unit filters added. You find them next to the display mode buttons. The following filters have been implemented (the button in brackets) : 

  1. Units that can move (white foot)
  2. Units that cannot move (red foot)
  3. Wounded units (red cross)
  4. Healthy units (green cross)
  5. Domain filter air units (plane)
  6. Domain filter sea units (ship)
  7. Domain filter land units (tank)
  8. Combat units (crossed swords) 
  9. Domestic units (peace symbol) 
  10. Player units (green flag) 
  11. Foreign units (red flag) 

An active filter is displayed with a yellow ring. By default all filters are inactive.  To turn off all filters, press the red "null" button between the upgrade grouping button and the movement filter buttons. 

6.) Plot list grouping modes 

There are two grouping modes implemented. The grouping modes have influence in the order the units are displayed. If a stack display mode (vertical or horizontal) is selected it also have an influence on what is displayed in a stack: 

  1. Unit type grouping (overlapping squares)
    Default grouping mode.  When the display mode is a stack mode, then units of the same type are put into one stack.  For more details, see Appendix (i).
  2. Selection group grouping (square and triangle)
    Click on the "overlapping squares" button to toggle between the two modes.  In this mode, units which are in the same selection group are displayed together. Also the selection groups are displayed right most within their domain. When the display mode is a stack mode, then units within the same selection group are put into one stack.  For more details, see Appendix (ii)
7.) Plot list upgrade view 

The upgrade view (button with the up-arrow) can be used to get a clear overview about the units which can be upgraded. It also provides a simple method to upgrade a bunch of units without selecting each unit first.  

When you press the button only units which can be upgraded are displayed. If you also have a stack view active, above each unit its possible upgrades are displayed. The upgrade buttons are disable (displayed, but you can't push them) you don't have enough money to perform the upgrade. 

By pressing one of those upgrade buttons, the unit is upgraded to that type. Usually that results in that the unit disappearing from the view, because in most cases only one upgrade is possible. If you press the Ctrl-key when pressing an upgrade button all units on that plot are upgraded, when pressing the Alt-key all of the player's units are upgraded. If you run out of money during those multi upgrades, it simply stops doing it (as in normal Civ4).

By moving the mouse over an upgrade button, a special info pane is displayed on the left side of the screen. It provides you with the unit type related info of the upgrade and with three values in brackets, separated by a slash. The three values have the following meaning: 

If one of the values exceeds your current budget, it is displayed in red, otherwise in green. The colors can be modified in the ini-file. Of course, those multi-upgrade only upgrades the units of the same unit type.

8.) Plot list promotion view 

This view (button with the "star" on it) is very similar to the upgrade view. It displays only units which can be promoted. If a stack view is active, above each unit its possible promotions are displayed. By pressing such a promotion button, the promotion is performed and the display is refreshed. This could result in that the unit disappears from list because there are no more promotions possible, or that new promotions are displayed if the experience points of the units does allow that. 

You can use the "level" in the unit info pane to check how much promotions are possible. (see chapter 2.) 

9.) Move highlighter 

When you hold down the alt-key, hover the mouse over a plot list button, the plots the unit can reach with its remaining movement points are highlighted.

10.) Configuration 

The PLE mod can be configured either by manually editing the BUG Mod.ini file or by using the in-game BUG Options screen.  Many options can be changed, switched off or modified.  

Credits

Forum: http://forums.civfanatics.com/showthread.php?t=149572

Author: 12Monkeys

 

Author's Credits and Thanks

The Great Apple, Belizan :
- for the initial idea and motivation of the implemented Move Highlighter

Dr. Elmer Jiggle :
- for the used INI Parser (modders : use it!)

Firaxis and the Civ4-Team :
- making this game so moddable. Although I haven't played it since months, I still have a lot of fun to mod it. I never had so much fun with a game over such a long time.

Civ4 community at CivFanatics, especially in the C&C subforum :
- for all the inspiration, help and ideas.

Appendix

    1. The main problem of the complete mod was to modify the unit selection in the plot list. The existing API function CyInterface.selectUnit() and CyInterface.selectGroup() are quite a mess. You have no chance to create a selection group without the function CyInterface.selectGroup(). The problem with that is, that this function doesn't have a any parameter for a unit. It directly checks the existing units on the plot and takes it decisions, so that you don't have any influence to it. Because I want that the selection groups doesn't select any unit which is not displayed due to one of the display filter, I had to make several crazy program climbs (you can watch them in the selectGroup() function in the PLEMainInterface.py). Main method to avoid those things is to temporarily move away (with CyUnit.setXY()) those units I don't want to be added to the group, create the group with CyInterface.selectGroup() and then move back those "parked" units.  

      Due to that changes it might be possible, that there are some error in I haven't caught so far. Also, the behavior of the complete selection functionality could be slightly different to that you know. If you found any problems, just inform me, please. 

  1.  
    1. The grouping is done by unit type. That means that the units are sorted in the following order : 
ATTENTION : 
There is one exception for the sorting: cargoed units. As soon as a unit is cargo of another unit, the cargo unit is always displayed BEHIND its transporting unit. Within the cargo units, the sorting is as mentioned above. This is as in Civ4 standard, but has some effects to the stacked views modes: cargo units are displayed together with their transport unit in the same stack, where the cargo units are on top off their transport unit. 
    1. The above grouping is slightly changed : 

Again, cargo units are displayed together with their transport units. This view is ideal to create complex selection groups. 

Tip : try the "Group" grouping and create selection group by selecting single units holding the shift key down. Looks funny ;)