[BTS] Percentage Based Score Graphs

Moxx

Chieftain
Joined
Nov 7, 2005
Messages
30
I was always sick of graphs that came with Civ since by the time you reach the near end of the game the first 40% of the graph has all the scores mashed into the bottom. For example:



I know you can limit the graph to 50 turns to see more clearly but I want the whole history.

I searched the forums and didn't find anything like this done so I decided to fix it and since it works pretty well I decided to give back a bit to the forums since I read them so often. :)

The graphs display the percent each civ has of the total score type for the turn. It only displays civs just like the regular graphs. (you need enough espionage points to see them) The percents also reflect the percents of the civs which are displayed. So if you have a score of 20, Civ B has a score of 50 and Civ C has a score 30 but you only have enough points to see Civ C, the graph will show you at 40% and Civ C at 60%. One you can see Civ B the percents will be recalculated and display you at 20%, Civ B at 50% and Civ C at 30%. Unfortunately this also means when you can't see anyone else on the graph you will be displayed as 100% until you get enough espionage points to see another civ.

The graph will also "zoom" a bit so it will fill the whole graph. If the highest percent score anyone ever achieved was 15% then that would be the top of the graph. The max and min values are shown in white on the right hand side.

One problem I encountered with the graph was it got pretty messy since your percent score for some of the graphs like prod / gold can change pretty fast. I fixed this by taking the average of the last x turns for each point on the graph. Here are some examples of the same game (epic speed) as above.

No averaging:

Each point is the average of the last 5:

Each point is the average of the last 10:


I have set some default values to which vary by the game speed. (0 / 3 / 5 / 10) (Quick / Normal / Epic / Marathon). I have not really tested anything but epic too much. If you have different game speeds modded in it will default to 0 averaging.

This file is for BTS, if enough people request it I can make a warlords / regular version one since it's fairly easy. It does not break anything so you can swap in the file and take it out and your game will not be affected. I believe it takes slightly longer to bring up the graphs since the calculation is more complex but its not very noticeable.

Just put the file in your Custom Assets/Python/Screens folder. Enjoy!
 

Attachments

  • CvInfoScreen.zip
    18.9 KB · Views: 82
This is actually much like what the games score graph started with (install Civ4 1.0 right off the disk and you should still get this) but the original used a band of color the width of which was proportional to the score percentage, of course back then you had no espionage obscuring things. People disliked it a lot cause it was very hard to see your absolute standings, the current score graph is actually a mod someone made that was incorporated in a patch a few weeks after the game first came out.

A return of the original percential graph would be interesting as an option but I think you need to make some modifications. Theirs currently a lot of disruption caused when civs startup or drop out as the divisor of the percent calculator changes. To compensate make the graph box change in height as the Civ count changes. A series of these stair steps would allow the 'ribbion' of each civs score to be much more constant in thickness without erronious jumpiness.

Heres some of the math for how it would work, H is the normal height area (in pixels) of the graph box (which is determed at run time from your screen resolution), let M be the maximum number of civs at any single time slice in the graph and A the actual number for a given time (for BtS these are just the 'known/spied on' civs). The Height for each stair step would thus be (H/M) * A, ideally the top of the graph being flat and the steps occurring on the bottom ware the new civilizations ribbon would appear or disapear. Each ribbon within each step would then be equal in height to (Score/Total Score) * Step Height.
 
Top Bottom