full PLE mod for BUG

1. I didn't touch (I think) that but I will have a look
2. Oops - good catch
3. Hmm - I'll take a look but not to sure what I can do there
4. Noted
5. Isn't that built in? I will try and look at it if I can. I am planning on folding in the route highlight code
6. I'll take a look.
 
1. I didn't touch (I think) that but I will have a look
Well when you switch back to vanilla it works fine, so something's different with the BUG PLE regarding this. Becomes a bit of a problem in the later game.
3. Hmm - I'll take a look but not to sure what I can do there
As my add-on note says, it's just a matter of the yellow highlight behavior. The yellow highlight shouldn't disappear if I was holding ALT or CTRL and clicked on the unit.
5. Isn't that built in? I will try and look at it if I can. I am planning on folding in the route highlight code
If you look at my two last screenshots in the previous post you'll see that the right-click-hold movement indicator (that is built in to the game) is incorrect. It shows that stack of units as having run out of movement points much sooner than what actually happens. If you crunch the algorithm to make the route highlight code work, it should be the same basic principle to apply to this.


New additions:
7. Great general star dot non-functional.​
8. Plot list should hide when fully zoomed out (in world view).​

I'm not ready to call it an issue yet, but I noticed enemies' health bars do not display when I have a unit in the same plot. They show up as greyed out, but with no health bars. The health bars do display with the vanilla version, but I'm torn how useful it was.
 
Just to give a quick update. I've played quite extensively and haven't found anything more past the 8 issues that are pending, two of which are just enhancement requests. The most annoying to play with (IMHO) are the yellow highlight behavior and missing great general star dot.

I've been trying to nail down the yellow highlight behavior to better describe it. There are two cases that I see.

a. The first is when a group of units is selected and you click on a single unit within that group (already highlighted). That single unit is now the only one active as confirmed by the lower left window. The yellow highlight is gone, however, and the plot list looks like nothing is selected. If you give an order that one unit responds as expected.​

b. The second I already brought up. CTRL or ALT clicking on an already active unit removes the yellow highlight. The unit really is still selected, however.​

Conclusion: The unit selection behavior is fine. The correct units are always selected, but the yellow highlight becomes out of sync with what units really are active.
 
I haven't been able to look at this this week. I'll review your 8 issues and post some suggestions / comments / additional code.

Are you ok with grabbing stuff from the SVN branch for this?
 
No rush. :) I think you're almost there since I can't find much else wrong. :goodjob: Your work is definitely worth it though. The speed differences and associated smooth game-play are rather noticeable.

PLE branch access is fine. I've been working off rev 2095.
 
BUG Unit Plot Items Required

See the SVN for the latest version (https://civ4bull.svn.sourceforge.net...g/branches/PLE). Note that the unit scroll white arrows are NOT WORKING.

Update as of Revision 2095
  1. unit button (done)
  2. selected unit yellow highlight (done)
  3. other player units in non enabled mode (not tested yet)
  4. Promo Frame (done)
  5. Dot information (done)
  6. Upgrade arrow (done)
  7. Mission (done)
  8. Health Bar (done)
  9. Hide Health bar if in battle (done)
  10. White arrows if more than x units (x changes with resolution) (under development)
  11. Number of units per row changes with resolution (done)
  12. City screen up (done) - but the white arrows are broken
  13. Normal unit actions (issue orders, upgrade, promote, group, degroup, etc) (done)
  14. movement bar (outstanding)

Reported Issues
  • Promotions appear behind the unit graphics. The attached Calvary example is no big deal, but other units cut off half the promotions. Switching back to vanilla mode corrected the problem as expected
  • Plot list leaks through on the spaceship completion screen. (I'll try to check if that always happened. It's not a big deal since the popups in the upper right corner do the same thing)
  • CTRL and ALT clicks deselect the current unit if it was already selected. If I have an infantry selected (with yellow outline) and CTRL click on it, I'd expect to see all the infantry in the stack selected. That happens, except the Infantry I CTRL clicked on is now deselected. Similar erroneous behavior with ALT clicks. After more tinkering I think the unit is selected (as far as the game is concerned) but the yellow outline disappears
  • Possible enhancement: ALT click on ground units select all ground units, not air units. This behavior has been around since vanilla civ4
  • Possible enhancement: It would be nice if the right-click movement indicator actually displayed how far a stack can move over railroads. See the last two screenshots below
  • Hiding the interface (via ALT+I) doesn't hide the plot list. May be related to the issue of the plot list not disappearing on its own if you switch back to Vanilla or PLE mode. A screen refresh via ALT+TAB is necessary otherwise the BUG plot list turns into a ghost.
  • Great general star dot non-functional
  • Plot list should hide when fully zoomed out (in world view).

I've changed your reported issues to A, B, C, etc so that they don't clash with my list of required items.
 
BUG Unit Plot Items Required

See the SVN for the latest version (https://civ4bull.svn.sourceforge.net...g/branches/PLE). Note that the unit scroll white arrows are NOT WORKING.

Update as of Revision 2103
  1. unit button (done)
  2. selected unit yellow highlight (done)
  3. other player units in non enabled mode (not tested yet)
  4. Promo Frame (done)
  5. Dot information (done)
  6. Upgrade arrow (done)
  7. Mission (done)
  8. Health Bar (done)
  9. Hide Health bar if in battle (done)
  10. White arrows if more than x units (x changes with resolution) (under development)
  11. Number of units per row changes with resolution (done)
  12. City screen up (done) - but the white arrows are broken
  13. Normal unit actions (issue orders, upgrade, promote, group, degroup, etc) (done)
  14. movement bar (outstanding)

Reported Issues
  • Promotions appear behind the unit graphics. The attached Calvary example is no big deal, but other units cut off half the promotions. Switching back to vanilla mode corrected the problem as expected
  • (fixed in 2103) Plot list leaks through on the spaceship completion screen. (I'll try to check if that always happened. It's not a big deal since the popups in the upper right corner do the same thing)
  • CTRL and ALT clicks deselect the current unit if it was already selected. If I have an infantry selected (with yellow outline) and CTRL click on it, I'd expect to see all the infantry in the stack selected. That happens, except the Infantry I CTRL clicked on is now deselected. Similar erroneous behavior with ALT clicks. After more tinkering I think the unit is selected (as far as the game is concerned) but the yellow outline disappears
  • Possible enhancement: ALT click on ground units select all ground units, not air units. This behavior has been around since vanilla civ4
  • Possible enhancement: It would be nice if the right-click movement indicator actually displayed how far a stack can move over railroads. See the last two screenshots below
  • (fixed in 2103) Hiding the interface (via ALT+I) doesn't hide the plot list. May be related to the issue of the plot list not disappearing on its own if you switch back to Vanilla or PLE mode. A screen refresh via ALT+TAB is necessary otherwise the BUG plot list turns into a ghost
  • (fixed in 2103) Great general star dot non-functional
  • (fixed in 2103) Plot list should hide when fully zoomed out (in world view)

Revision 2103 fixes B, F, G and H. I can reproduce A and C but I currently have no idea what is causing that behaviour. Note that A is fixed if you promote the unit. Must be something to do with the order of the panel draw.
 
This is annoying. I have G working and then not working and then working and not working again. Stupid star!

Edit: It works if you change the underlying python file and the alt-tab back into the game. Civ reloads the python. Guess I need to change where the game saves the GG promotion.
 
BUG Unit Plot Items Required

See the SVN for the latest version (https://civ4bull.svn.sourceforge.net...g/branches/PLE). Note that the unit scroll white arrows are NOT WORKING.

Update as of Revision 2106
  1. unit button (done)
  2. selected unit yellow highlight (done)
  3. other player units in non enabled mode (not tested yet)
  4. Promo Frame (done)
  5. Dot information (done)
  6. Upgrade arrow (done)
  7. Mission (done)
  8. Health Bar (done)
  9. Hide Health bar if in battle (done)
  10. White arrows if more than x units (x changes with resolution) (under development)
  11. Number of units per row changes with resolution (done)
  12. City screen up (done) - but the white arrows are broken
  13. Normal unit actions (issue orders, upgrade, promote, group, degroup, etc) (done)
  14. movement bar (outstanding)
  15. ALT click to only select units of similar zone (all air, all ground, etc) (outstanding)
  16. 12Monkey's movement plot display (outstanding)

Reported Issues
  • (fixed in 2106) Promotions appear behind the unit graphics. The attached Calvary example is no big deal, but other units cut off half the promotions. Switching back to vanilla mode corrected the problem as expected
  • (fixed in 2103) Plot list leaks through on the spaceship completion screen. (I'll try to check if that always happened. It's not a big deal since the popups in the upper right corner do the same thing)
  • CTRL and ALT clicks deselect the current unit if it was already selected. If I have an infantry selected (with yellow outline) and CTRL click on it, I'd expect to see all the infantry in the stack selected. That happens, except the Infantry I CTRL clicked on is now deselected. Similar erroneous behavior with ALT clicks. After more tinkering I think the unit is selected (as far as the game is concerned) but the yellow outline disappears
  • Possible enhancement: ALT click on ground units select all ground units, not air units. This behavior has been around since vanilla civ4
  • Possible enhancement: It would be nice if the right-click movement indicator actually displayed how far a stack can move over railroads. See the last two screenshots below
  • (fixed in 2103) Hiding the interface (via ALT+I) doesn't hide the plot list. May be related to the issue of the plot list not disappearing on its own if you switch back to Vanilla or PLE mode. A screen refresh via ALT+TAB is necessary otherwise the BUG plot list turns into a ghost
  • (fixed for real in 2106) Great general star dot non-functional
  • (fixed in 2103) Plot list should hide when fully zoomed out (in world view)

Revision 2106 fixes A and G (this time when the game first loads :D)
 
Some items loaded by XML files are not available when the Python modules are initially loaded. This causes getInfoTypeForString() to return -1 for PROMOTION_LEADER. This is exactly why I created the <init> element in the configuration XML files.

Code:
GG_PROMO = None

...

def init():
    global GG_PROMO
    GG_PROMO = gc.getInfoTypeForString("PROMOTION_LEADER")
 
BUG Unit Plot Items Required

See the SVN for the latest version (https://civ4bull.svn.sourceforge.net...g/branches/PLE). Note that the unit scroll white arrows are NOT WORKING.

Update as of Revision 2108
  1. unit button (done)
  2. selected unit yellow highlight (done)
  3. other player units in non enabled mode (not tested yet)
  4. Promo Frame (done)
  5. Dot information (done)
  6. Upgrade arrow (done)
  7. Mission (done)
  8. Health Bar (done)
  9. Hide Health bar if in battle (done)
  10. White arrows if more than x units (x changes with resolution) (under development)
  11. Number of units per row changes with resolution (done)
  12. City screen up (done) - but the white arrows are broken
  13. Normal unit actions (issue orders, upgrade, promote, group, degroup, etc) (done)
  14. movement bar (outstanding)
  15. ALT click to only select units of similar zone (all air, all ground, etc) (outstanding)
  16. 12Monkey's movement plot display (outstanding)

Reported Issues
  • (fixed in 2108) Promotions appear behind the unit graphics. The attached Calvary example is no big deal, but other units cut off half the promotions. Switching back to vanilla mode corrected the problem as expected
  • (fixed in 2103) Plot list leaks through on the spaceship completion screen. (I'll try to check if that always happened. It's not a big deal since the popups in the upper right corner do the same thing)
  • (fixed in 2103) CTRL and ALT clicks deselect the current unit if it was already selected. If I have an infantry selected (with yellow outline) and CTRL click on it, I'd expect to see all the infantry in the stack selected. That happens, except the Infantry I CTRL clicked on is now deselected. Similar erroneous behavior with ALT clicks. After more tinkering I think the unit is selected (as far as the game is concerned) but the yellow outline disappears
  • Possible enhancement: ALT click on ground units select all ground units, not air units. This behavior has been around since vanilla civ4
  • Possible enhancement: It would be nice if the right-click movement indicator actually displayed how far a stack can move over railroads. See the last two screenshots below
  • (fixed in 2103) Hiding the interface (via ALT+I) doesn't hide the plot list. May be related to the issue of the plot list not disappearing on its own if you switch back to Vanilla or PLE mode. A screen refresh via ALT+TAB is necessary otherwise the BUG plot list turns into a ghost
  • (fixed for real in 2106) Great general star dot non-functional
  • (fixed in 2103) Plot list should hide when fully zoomed out (in world view)
  • (fixed in 2108) Non current players units are missing their health bars

Revision 2108 fixes C and I. C was funny ... I wasn't updating the unit plot because nothing had changed (unit, owner, is selected). However, the unit icon is actually a check box and so the mouse click was deselecting it. I've changed to force update the yellow box for all icons - this will slow it down a little, but not much we can do about it.
 
I wasn't updating the unit plot because nothing had changed (unit, owner, is selected). However, the unit icon is actually a check box and so the mouse click was deselecting it. I've changed to force update the yellow box for all icons - this will slow it down a little, but not much we can do about it.

Try force updating it only if it is the head selected unit (CyInterface().getHeadSelectedUnit() or something like that). This should be the unit that was actually clicked.
 
Rev 2108, issue C:

Still some odd behavior to report on the yellow outline. The first screenshot below shows the first plot I clicked on when loading a save - one unit selected, no yellow outline. Second screenshot shows the same on another stack.

There's additional quirks: Have any unit somewhere selected. Hold ALT and click a different plot / stack. All of the units will be selected in the left-bottom window, but the yellow outlines don't match.

Both problems are intermittent, and only really reproducible when loading a save. It seems to straighten out while playing, but as soon as you open/close BTS, the yellow outlines become out of sync again.

ALT clicking directly on the little unit icons when the plot is already active seems to be straightened out as do the keyboard shortcuts for ALT and CTRL selecting.

Rev 2108, issue I:

Third screenshot shows two problems - yellow outline around a foreign unit, and missing health bars on foreign units.
 

Attachments

  • 1.jpg
    1.jpg
    216.2 KB · Views: 190
  • 2.jpg
    2.jpg
    286.5 KB · Views: 134
  • 3.jpg
    3.jpg
    323.2 KB · Views: 174
Rev 2108, issue C:
Rev 2108, issue I:
Hereby designated ...
  • Issue J - Quirky highlight behaviour, especially when loading game
  • Issue K - yellow highlight for foreign units
  • Issue L - Missing health bars for foreign units
 
Have you been trying to make the PLE faster ruff_hi?
Did you read any of the last few pages? Read posts 169, 156 and 158.

The short answer is YES. The longer answer is that I hate PLE and would quiet happily see it die. We are writing a BUG version of the unit plot code that is quick, provides vanilla features (bare minimum) and PLE features (if we can).
 
Did you read any of the last few pages? Read posts 169, 156 and 158.

The short answer is YES. The longer answer is that I hate PLE and would quiet happily see it die. We are writing a BUG version of the unit plot code that is quick, provides vanilla features (bare minimum) and PLE features (if we can).
Very good!:goodjob: I hate PLE to.;)
 
Some more clarification on issue J (still rev 2108):

I'm going to say the problem is not so intermittent and not really tied to loading saves. "Refreshing" the stacks (by selecting all units thus synchronizing the yellow highlights with what's actually selected) seems to only fix the problem for a couple turns. Clicking on more stacks during normal gameplay still results in the yellow highlights being all over the place.

Not sure if you want to break this one off issue J, but city screen yellow highlights are off as well. They'll be phantom yellow highlights present on the city screen, and then selecting something to build will result in them disappearing. All the while, nothing is really selected.

Another example along similar lines is when I had an archer tied to unit group 1. Pressing 1 on the keyboard selects the archer (with yellow highlight correctly drawn) but another unit gets a yellow highlight as well (which is a phantom). Ordering the archer to skip a turn results in the yellow highlight disappearing from both, which is incorrect since the archer is still active.

All in all, I'm going to say that rev 2106 was in better shape. While rev 2108 specifically addresses issue C, I think it created more problems.
 
Top Bottom