Glad to see the in-game graphs
Moderator: Oberlus
Glad to see the in-game graphs
Just wanted to mention, nice start with the graphs, Geoff!
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Glad to see the in-game graphs
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.
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
I didn't know there are statistic graphs integrated in the game. Are they included in the current dev version?
If this post contains code, it's released under GPL 2.0 or later.
Re: Glad to see the in-game graphs
Yup. Goto 'pedia, click on Graph, then choose which graph you want.
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.
- eleazar
- Design & Graphics Lead Emeritus
- Posts: 3858
- Joined: Sat Sep 23, 2006 7:09 pm
- Location: USA — midwest
Re: Glad to see the in-game graphs
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...
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
Created statistics-file containing some new graphs I find useful. Tested.
__________________________________________________________________
Attached patches are released under GPL 2.0 or later.
__________________________________________________________________
Attached patches are released under GPL 2.0 or later.
- Attachments
-
- empire_statistics.zip
- (97.77 KiB) Downloaded 221 times
Re: Glad to see the in-game graphs
Planets, colonised planets and ships with weapons. I like, danke.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: Glad to see the in-game graphs
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
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Glad to see the in-game graphs
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)
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)
- Attachments
-
- empire_statistics-v6557.zip
- (98.34 KiB) Downloaded 219 times
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Glad to see the in-game graphs
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.Hihoo wrote:May I assume "Productioncenter" is similarly just a synonym for "Planet"?
-
- Space Kraken
- Posts: 124
- Joined: Fri Nov 22, 2013 8:47 pm
Re: Glad to see the in-game graphs
Oh yes! And be mobile repair/refit bases!Geoff the Medio wrote: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.Hihoo wrote:May I assume "Productioncenter" is similarly just a synonym for "Planet"?
Everything I post is self-created unless noted otherwise. It is simultaneously released under GPL 2.0 or later, CC Attribution-Share Alike 3.0, and GNU Free Documentation 1.2. Make something awesome with it please!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Glad to see the in-game graphs
Commited an edited version of the added statistics. You like to nest your And conditions unnecessarily it seems...
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...
Could you make the graph button's border less prominent? It doesn't fit with the other buttons...eleazar wrote:I already took the liberty of creating an icon button
icons/buttons/charts...
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...
- Attachments
-
- row of button icons
- buttons.png (7.86 KiB) Viewed 3527 times
- eleazar
- Design & Graphics Lead Emeritus
- Posts: 3858
- Joined: Sat Sep 23, 2006 7:09 pm
- Location: USA — midwest
Re: Glad to see the in-game graphs
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.Geoff the Medio wrote:Commited an edited version of the added statistics. You like to nest your And conditions unnecessarily it seems...Could you make the graph button's border less prominent? It doesn't fit with the other buttons....eleazar wrote:I already took the liberty of creating an icon button
icons/buttons/charts...
fixed revision 6956