BUG Charts

that should be do-able. BTW: how do you put the game into debug mode?
 
CTRL-Z will enter debug mode, assuming you have the chipolte stuff active in your INI. We should probably add that to the civilopedia shortcuts if its not there.

Done.

Ctrl+Z: Enter "chipotle" Debug Mode
 
I've just committed an update to the BUG charts. The chart / graph background is now click-able and will swap between the BIG chart and the 7-in-1 charts. Also, in the search for rendering speed, the little charts lines are only 1 pixel thick while the big chart lines remain 3 pixels thick.

I am also planning on putting on a drop down box for graph smoothing with numbers from 0 to 10. The higher the number, the quicker the graphs draw but each line segment is minimum x pixels long - so, smoother but you might loose some details in later years.

Now - we also have some options ...

A) Should the 7-in-1 smoothing be the same as the big graph smoothing? Or should it be half? Or a third?

B) Should we add leaders to the legend where you don't have enough spy pts to see their demographics but put them down the bottom of the legend, greyed out after a heading "Not Enough Espionage"?
 
Smoothing dropdown has now been committed. From a technical point of view - the smoothing factor is the minimum number of pixels in each line segment. If you select '0', the minimum line length is 1 pixel. This is the current game value. If you select '1', the minimum line length is 2 pixels. If you select 'n', the minimum line length is 'n+1' pixels.

The benefit of this - you get smoother lines. But, in later turns, the screen rendering is much quicker with higher smoothing factors (less lines the engine has to draw).

smooth0025qo6.jpg
 
just added civs that you have met but you don't have enough spy pts to the graph legend. There is a space between the civs where you do have enough spy pts and these other civs - also, the graph line for these other civs isn't shown.
 
I don't read the boards as often as I should, but I did stumble on this feature a few days ago and I really like it! Nice work :)
 
Smoothing dropdown has now been committed.

Great addition! :goodjob:
It has a big impact both on performance and on look :)
But can you please moove it (or even better the dropdown about turn) from the top right corner to the top left corner? In the ITA localized version where it is now it overwrites the final part of the title of the window. :blush:

Another improvement may be to memorize the selected smothing factor for 7in1 and for single graph, so that one doesn't have to change that value each time he flips between the two views.
 
Great addition! :goodjob:
It has a big impact both on performance and on look :)
But can you please moove it (or even better the dropdown about turn) from the top right corner to the top left corner? In the ITA localized version where it is now it overwrites the final part of the title of the window. :blush:

Another improvement may be to memorize the selected smothing factor for 7in1 and for single graph, so that one doesn't have to change that value each time he flips between the two views.

Has 'smoothing factor' been modified for local language? The drop down is a bit long for the English version but all the languages have been updated, I'll shorten it and / or move it if needed.

What two factors are you using for 7-in-1 and BIG? I could put in a constant relationship (ie smoothing factor 7-in-1 = smoothing factor BIG / 3)
 
Has 'smoothing factor' been modified for local language?

Yes, of course :)

The drop down is a bit long for the English version but all the languages have been updated, I'll shorten it and / or move it if needed.

In ITA it's even longer, and also the title of the window is mch longer, so moving it to the top left corner will be the best solution. Or moving it to the top right corner and moving the turn-selecting dropdown to the top left corner.

What two factors are you using for 7-in-1 and BIG? I could put in a constant relationship (ie smoothing factor 7-in-1 = smoothing factor BIG / 3)

I don't know for sure, for now I tried with extreme values (0 and 10), but in any case if you can store in two different variables the factor selected in big screen and the one selected in 7in1, it will be perfect. When I say "save" I don't mean save between game sessions, it's enough if it can be saved while I'm flipping between views. And furthermore doing so you can set two different default values, one for big screen and the other for 7in1... much better than a constant ratio, IMHO.
 
just committed the following:

- moves smoothing dropdown to top left
- created different smoothing dropdowns for BIG and 7-in-1 graphs
- changed tab spacing so 'statistics' isn't obscured
 
There's a problem with using the top left for the smoothing menu. In debug mode, the top left is where they place the "choose player" menu so now those two menus overlap:

1223240763.jpg


EDIT: And the debug menu dropdown seems broken now too; not sure if it's due to the overlap or some other problem. The following error gets thrown when anyone other than the active player is selected:
Code:
Traceback (most recent call last):

  File "CvScreensInterface", line 899, in handleInput

  File "CvInfoScreen", line 2468, in handleInput

  File "CvInfoScreen", line 636, in redrawContents

  File "CvInfoScreen", line 674, in drawGraphTab

  File "CvInfoScreen", line 929, in drawGraphs

  File "CvInfoScreen", line 1020, in drawGraph

  File "CvInfoScreen", line 853, in getHistory

TypeError: unsubscriptable object
ERR: Python function handleInput failed, module CvScreensInterface
 
hmmn - that is only available in debug mode? What about smoothing factor below turn dropdown?

I'll take a look at the error you mention - I'm assuming I have to throw the game into debug mode - how do you do that again?
 
To put the game into debug mode, use ctrl-z.

I went back and checked with the unmofidied 3.17 info and the error is not actually our fault; it occurs with original info screen too, but only on the score graph. I think it has something to do with the history "cache" but haven't explored too closely. Unfortunately with the 7-in-1 screen, the score graph is the first to be displayed so once we get the error, none of the other graphs show either.

As for positioning, I don't know. The special debug menu should stay in the upper left because it also shows on other advisor screens too and is always in the upper left. Putting the smoothing menu below the turn menu might not look so good since it wouldn't be in the "header" anymore. Could we instead tweak the title of the window over to the left some to avoid the overlap with the side-by-side arrangement or would that look too odd being not centered?
 
I just tested it and didn't get any problems. Well, that isn't 100% correct - it crashed when I asked it to show me the graphs from the barbarian's point of view :D.

I was using a later game save where everyone had enough spy pts to see all the graphs. Might that be an issue?
 
OK, I think the problem is if you try to switch to a civ that doesn't know the human player. For example, on the attached save I get the error when switching to anyone other than Ragnar since only Ragnar knows the human.

I guess it's because the buildScoreCache() function ignores those the active player hasn't met.
 

Attachments

yeah - I got that error to. I guess we should modify buildScoreCache to pick up everyone?

Edit: this is actually more difficult that you would think. How about we just leave it?
 
I don't mind leaving it for now since it is a very special situation and it's present in the non-BUG version too. I'll probably wind up fiddling with it myself for the non-BUG info screen for my next Unofficial Patch release and BUG can pick up the fix later.
 
Okay, I know how to fix the original version but it causes a small problem in the legend in our version. I can't believe the amount of tab/space mixing in the Firaxis version of that file....

Anyhow, with the following addition to the revision 1412, the main error goes away. Quote starts at line 2459
Code:
				# Determine who this active player knows
				self.aiPlayersMet = []
				self.iNumPlayersMet = 0
				for iLoopPlayer in range(gc.getMAX_CIV_PLAYERS()):
					pLoopPlayer = gc.getPlayer(iLoopPlayer)
					iLoopPlayerTeam = pLoopPlayer.getTeam()
					if (self.pActiveTeam.isHasMet(iLoopPlayerTeam)):
						self.aiPlayersMet.append(iLoopPlayer)
						self.iNumPlayersMet += 1
[COLOR="DarkGreen"]				# Force recache of all scores
				self.scoreCache = []
				for t in self.RANGE_SCORES:
					self.scoreCache.append(None)
[/COLOR]				self.redrawContents()

However, look at the legend (Note that Tokugawa is the selected leader)
1223252174.jpg
 
Back
Top Bottom