Page 1 of 1

Glad to see the in-game graphs

Posted: Wed Oct 16, 2013 5:17 pm
by Dilvish
Just wanted to mention, nice start with the graphs, Geoff!

Re: Glad to see the in-game graphs

Posted: Wed Oct 16, 2013 7:02 pm
by Geoff the Medio
Note that the statistics shown in the graphs are customizable: empire_statistics.txt.

The Statistic format has a name parameter, which is a string that is looked up in the stringtable, and then a value parameter, which is a ValueRef. The value is stored persistently in the universe (including in saved and loaded games), and is what's plotted each turn for each empire. The available values are listed in the graph directory in the pedia.

The most obvious / useful way to use the value expression is to calculate a statistic for empires, like a Count of objects or Sum of object properties (like meter values).

The way this works is that that a source object is selected for each empire, which is an object owned by that empire (usually its capital), and then the ValueRef is evaluating using that source object. This allows the expression to use Source.EmpireID to pick only objects relevant to the empire for which the statistic is being calculated.

However, due to how conditions work, there's no good way to use this to also get a graph for non-player stuff (ie. how many monsters exist in the universe).

If someone would like to implement a nice way to pick what axis values to mark with ticks (there's presently no scale shown) or a better automatic axis scaling method, that would be helpful. A legend showing which colour corresponds to which empire might be helpful, but it's already shown in the Empires window.

Re: Glad to see the in-game graphs

Posted: Sat Nov 23, 2013 4:33 am
by Num7
I didn't know there are statistic graphs integrated in the game. Are they included in the current dev version?

Re: Glad to see the in-game graphs

Posted: Sat Nov 23, 2013 4:47 am
by yandonman
Yup. Goto 'pedia, click on Graph, then choose which graph you want.

Re: Glad to see the in-game graphs

Posted: Sat Nov 23, 2013 12:20 pm
by eleazar
Cool

Graphs IMHO deserve their own icon among those in the upper right.
I already took the liberty of creating an icon button
icons/buttons/charts...

Enhanced empire-statistics v6535 and up

Posted: Tue Dec 03, 2013 3:49 am
by Hihoo
Created statistics-file containing some new graphs I find useful. Tested.
__________________________________________________________________
Attached patches are released under GPL 2.0 or later.

Re: Glad to see the in-game graphs

Posted: Tue Dec 03, 2013 8:42 am
by MatGB
Planets, colonised planets and ships with weapons. I like, danke.

Re: Glad to see the in-game graphs

Posted: Tue Dec 03, 2013 9:13 am
by Dilvish
FYI, there shouldn't currently be any distinction between the PopCenter graph and Planet graph -- all Planets are PopCenters (but in the future it could be possible to have other types of PopCenters). If you want nonzero pop you have to put constraints like Population low = 0.01

Re: Glad to see the in-game graphs

Posted: Tue Dec 03, 2013 11:57 am
by Hihoo
So Gasgiants are Populationcenters - I'm perfectly happy with that!
May I assume "Productioncenter" is similarly just a synonym for "Planet"?

__________________________________________________________________
Attached patches are released under GPL 2.0 or later.


Including my replacements for v6557 (tested with gasgiant, should work with v6535)
(stringtables of v6535 break v6557 so v6535 is dead)

Re: Glad to see the in-game graphs

Posted: Tue Dec 03, 2013 4:48 pm
by Geoff the Medio
Hihoo wrote:May I assume "Productioncenter" is similarly just a synonym for "Planet"?
Presently, yes. In future, possibly no. I'd like the game to support production ships, both generating and spending PP (and RP or any other relevant resource), in order to have nomadic empires or scenarios.

Re: Glad to see the in-game graphs

Posted: Tue Dec 03, 2013 8:44 pm
by shawndream
Geoff the Medio wrote:
Hihoo wrote:May I assume "Productioncenter" is similarly just a synonym for "Planet"?
Presently, yes. In future, possibly no. I'd like the game to support production ships, both generating and spending PP (and RP or any other relevant resource), in order to have nomadic empires or scenarios.
Oh yes! And be mobile repair/refit bases!

Re: Glad to see the in-game graphs

Posted: Sat Feb 01, 2014 7:57 am
by Geoff the Medio
Commited an edited version of the added statistics. You like to nest your And conditions unnecessarily it seems...
eleazar wrote:I already took the liberty of creating an icon button
icons/buttons/charts...
Could you make the graph button's border less prominent? It doesn't fit with the other buttons...

Edit: and I frequently want to click on it when meaning to close another screen, as the border makes it look like it's always highlighted...

Re: Glad to see the in-game graphs

Posted: Sat Mar 08, 2014 11:15 pm
by eleazar
Geoff the Medio wrote:Commited an edited version of the added statistics. You like to nest your And conditions unnecessarily it seems...
eleazar wrote:I already took the liberty of creating an icon button
icons/buttons/charts...
Could you make the graph button's border less prominent? It doesn't fit with the other buttons....
It wasn't supposed to be that way. The transparent part got filled with white. Either i saved it in the wrong format the first time, or more likely somebody re-saved.

fixed revision 6956