full PLE mod for BUG

its all python and can be driven from the custom asset folder.
 
No, no, no, a little, yes and yes. I think I got that right. Its not ready for prime time yet ... still need to allow for the situation where there are too many units on the plot (those little arrow things), for when the city screen is up (only 1 row) and also need to include non-player units.

If only we had some people who were interested in helping to test this.

I can lend a hand. I helped 12monkeys with testing the original PLE. I was also planning to start a new game anyway to finish testing my unofficial patch update to BULL.

I'm missing some of the history surrounding this undertaking. I usually play with the PLE itself off, but use the blue outline for promotion-eligible units, wounded dots and GG stars. Even this gets slow late game, however. Are your speed enhancements aimed at helping the plot list in general or only when having the PLE option on? I guess at some point you separated the blue outlines etc. from the PLE itself.

I'm willing to give it a try either way though.

I originally stopped using the PLE option because of the slow down and some quirks that I noticed along the way. The most severe of which was the inability to select all non-air units in the plot when there were air units present. The stock game doesn't allow an easy way to do this either, but clicking on a single non-air unit and then ALT+SHIFT clicking on another non-air unit got the job done. This trick didn't work in the BUG PLE. This could be rather outdated, however.

Point me to the files and any options I need to set to activate it. I thought I read in previous posts (that I very quickly skimmed) the code is in there, but currently being bypassed. As I said before, a little background would help focus my testing. Am I looking for stability, speed enhancements etc.
 
I haven't got much time now - I will be able to provide full details Thursday night. I've attached the 5 files that you need to copy over v4.2 of BUG (custom asset install or as a mod - doesn't matter). Suggest you create a new folder for this so that we don't trash your existing v4.2 install.

On the PLE tab of the options you will see a drop down called 'draw method'. BUG is the brand new method - not fully functional yet. PLE is the PLE method but I have pulled (or attempted to pull) all of the PLE code out of the maininterface file - I tested it but not fully so don't be surprised if PLE falls over. Vanilla is the normal BtS method but it uses some PLE functions to actually draw the Dot, Upgrade, Promoframe, etc. I don't expect any errors with vanilla.
 

Attachments

  • CustomAssets-BugUnitPlot.zip
    107.4 KB · Views: 187
Are we looking for errors/crashes, or checking speed? Or should I just wait for Thursday's info? :) And will it be useful to separately check on XP/Vista/7?
 
There shouldn't be any operating system issues in play here; this is pure basic Civ4 drawing code. We're looking for any bugs you find: drawing problems, error messages in Logs/PythonErr.log, etc. Also, is it faster or slower for you now?
 
I haven't merged ruff_hi's files into my own yet since I'm still using BUG build 2085. I quickly popped into the game to familiarize with some of the options, and I have a question. What does the top-left-most checkbox do? I think it's called "use PLE style" or something similar. The hover text suggests it needs to be checked for the rest of the tab to function, but this is not the case. It doesn't seem to have an effect at all.

Hopefully I'll be able to give this a whirl within the next few days.
 
"use PLE style"
I admit it - I hate the look of PLE. It just grates on me. As I have access to the python code, I jumped in and restored the traditional vanilla look (health bars at the top, etc). Unchecking PLE style uses the vanilla approach and all of that fancy horizontal grouping doesn't work. The dot, mission, promo stuff does work.
 
History

As you know, BUG started as a collection of other people's mini-mods. Typically, we reviewed and improved the code as we folded it into BUG (120% of the improvement was due to EF, -20% of the improvement was due to Ruff). Neither of us had the burning desire to fold in the 1000 or so lines of code contained in PLE. However, I liked the promo frame and some of the other do-dads (star for GG), so I lifted that code and put it into the unit plot list.

Honesty alert: I hate PLE. It is ugly, doesn't provide any benefit, the code is horrible, you have to recode tons of stuff just to get it to work and I hate it. Don't expect me to like it. If I had my way, we would nuke it from orbit. Now that I have declared my preferences, I feel totally fine in letting my bias come through :D. Feel free to tell me that I am nuts and that PLE adds X, Y or Z functionality and is really, really cool. Just expect me to totally disagree with you.

There were a few requests for PLE and we kept them at bay with the 'no time' line. That was, until a user posted a fully working, latest BUG, maininterface python file with PLE included. We (foolishly in my opinion) just grabbed it, wrapped some options around it and folded it in and thus 'broke' the vanilla unit plot list method. This was about 12 hours before a major release ... don't ask me why we did that.

Anyway, subsequent to that, we improved the graphics, re-enabled the vanilla code (PLE style check box) and left it.

Both methods suffer when you have plots with lots of units (> 100). EF postulated that this is because we are redrawing the whole screen every time. EF and I discussed how to fix and it stalled for lack of will / desire / skill / time (take your pick). Both EF and I took separate stabs at wrapping the unit plot stuff in classes, but neither of us fully finished anything (me because I don't fully understand classes and EF because he had other stuff on his plate).

Current Code Changes

So that we don't totally break the current situation, I added a 3rd method of drawing the unit plot list - the BUG method (see 'Notes on BUG method' section below). There are now 3 methods ... Vanilla, PLE and BUG. As a side aim of this, I decided to try and pull the 1000 lines of PLE code out of the maininterface file. It is my hope that the BUG method will totally replace the Vanilla method and that the ugly PLE method will remain as an alternative.

General Testing

You should test the normal stuff that you do with the unit plot list (selecting units, grouping, ungrouping, issuing orders, promoting, upgrading, etc, etc. Feel free to test this with any of the 3 methods (Vanilla, BUG and PLE). Keep in mind that we aim to replace Vanilla with BUG at some stage. If there is any differences, then the Vanilla method should win as it should reflect raw BtS the best. We want BUG and PLE to enhance the Vanilla methods so we shouldn't lose functionality when we move away from Vanilla.

You shouldn't see any speed improvements when using Vanilla or PLE. All of our current speed improvement code is in the BUG method. I would suggest that you play a normal game but with error logging enabled (including on screen pop-ups). At the end of a session, check the error log file (file name) to see if you ran into any errors. Keep in mind that we are modding a core part of the screen refresh code that is fired lots and lots of time - if you run into an error, you will probably have to Ctrl-Alt-Delete back to the task manager to kill off Civ4.

Vanilla Method Testing

Nothing really to add here as I didn't really play with the code. I did push some display methods into the PLE file but I don't think they should have caused any problems.

PLE Method Testing

As mentioned above, I pulled the PLE code out of the main interface file into its own file. I got it working but I know that I didn't test every little PLE thing - there could easily be bugs in there.

BUG Method Testing

This code is totally new and not fully functional as yet. I'll put together a list of things that this code will need and indicate if (I think) it is in there yet. I expect quiet a bit of feedback from this section of the testing (ie lots of bugs).

Notes on BUG method

The main aim of the BUG method is to utilize the core unit selection process built into the game (so that we don't need to re-write the unit selection, upgrade, etc code as per PLE) and to provide a significant speed improvement. The speed improvement comes by comparing the unit in a particular unit plot cell to the prior unit in that cell and only drawing stuff if it changes. At the moment, changing plots causes a complete redraw, so you will not see any speed improvement if you flip between 2 plots that both have 100 warriors in them. You should see speed improvement if you flip between different warriors in the same cell.

BUG Unit Plot Items Required

  1. unit button (done)
  2. selected unit yellow highlight (done)
  3. other player units in non enabled mode (done)
  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) (outstanding)
  11. Number of units per row changes with resolution (done)
  12. City screen up (outstanding)
  13. Normal unit actions (issue orders, upgrade, promote, group, degroup, etc) (done)
  14. movement bar (really? Doesn't the dot give you that information?)
Are there others that I need to add to this list?
Spoiler :
So, maybe Thursday comes early this week :D
 
BUG Unit Plot Items Required

Updated file. City screen up now works. Did you always get the hovers containing unit information when the city screen was up (hover over a unit in your city)?

  1. unit button (done)
  2. selected unit yellow highlight (done)
  3. other player units in non enabled mode (done)
  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 (not sure)
  10. White arrows if more than x units (x changes with resolution) (outstanding)
  11. Number of units per row changes with resolution (done)
  12. City screen up (done)
  13. Normal unit actions (issue orders, upgrade, promote, group, degroup, etc) (done)
  14. movement bar (really? Doesn't the dot give you that information?)
 

Attachments

  • CustomAssets-BugUnitPlot.zip
    107.6 KB · Views: 137
BUG Unit Plot Items Required

Updated file. City screen up now works. Did you always get the hovers containing unit information when the city screen was up (hover over a unit in your city)?
Downloaded and merged your attachment. I'm going to implement local subversion so I can better answer questions like this regarding mouseovers of units in the city screen. My answer right now is: I don't remember either. My personal preference is: I never use mouseover info (or the plot list for that matter) when in the city screen, but I'm sure others do.

  1. Health Bar (done)

I can't get health bars to show up at all with the BUG layout activated. I tried numerous combinations of options in the plot list tab of the BUG options screen to no avail.

Somewhat off-topic: Eventually, you may want to rethink the plot list options tab of the BUG options screen. This goes back to my question earlier about the PLE style option. It's not clear at all what options are affected by activating the PLE style. Is it only the placement of the health/movement bars?

I'm working off your Jan 13, 2010, 10:18 PM drop. Unless you branch in subversion, I guess we're stuck referring to releases by attachment post on these forums.
 
responses ...
  • I checked vanilla BtS and it does have a hover in city screen up mode.
  • Health Bar - hmmn - I have one bar there - at the bottom of the unit icon ... isn't that the health bar?
  • the option tab will be completely redone (later) to make it clear what is in both, what is in PLE and what is in BUG
 
See attached screenshot. No bars of any kind. I'd include an options screenie as well, but as I said, I tried many combinations. Our configurations must be different somehow. Can you branch off a dev SVN for this so I can copy down your entire customAssets? If that's too much trouble, how about a ZIP of your folder?

I tried a clean BUG build 2092 with your Jan 13, 2010, 10:18 PM changes and had the same result.
 

Attachments

  • Civ4ScreenShot0006.JPG
    Civ4ScreenShot0006.JPG
    154.6 KB · Views: 149
I just discovered the branch an hour ago by looking at some other posts. Somehow I missed it previously, one too many mouse clicks I guess.

In any event, I synced with the PLE branch revision 2087 (which BTW has a different version of BugUnitPlot.py than the ZIP you posted earlier), and am still missing all bars on the plots.

I feel like we're still in revision hell. Perhaps there's more file(s) I need that aren't under revision control on your system.
 
I haven't pushed my latest file to the SVN - I'll do that. However, be away that I am playing with the white arrows and they don't work at the moment.

I just cracked open a game to grab a screen shot ... only to find that I don't have any bars either. I do have dots, missions, promoframe and stuff. Guess I will need to look at my code.
 
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 2094
  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 (outstanding)
  9. Hide Health bar if in battle (not sure)
  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)
 
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)

I added the health bar. Note that the health bar color will only be Green if the unit is at full health. If it is between 67% and full health, the color should be Light Green (no more hunting for that 1 unit that isn't full health). I haven't tested this as I don't have any injured units - hopefully you can tell the difference between Green and Light Green.
 
The speed improvement is definitely noticeable. I no longer cringe when clicking on large stacks. :goodjob:

I guess I'll keep a running list of issues:

1. 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.​
2. 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).​
3. 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.​
4. Possible enhancement: ALT click on ground units select all ground units, not air units. This behavior has been around since vanilla civ4.​
5. 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.​
6. 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.​

This is all per revision 2094. I see that you posted revision 2095, so I'll give that a whirl next (I really was missing my health bar :sad:).
 

Attachments

  • 1.jpg
    1.jpg
    24.1 KB · Views: 140
  • 2.jpg
    2.jpg
    158.2 KB · Views: 168
  • 3.jpg
    3.jpg
    324.3 KB · Views: 160
  • 4.jpg
    4.jpg
    323.8 KB · Views: 146
Top Bottom