Data type: statistics dimension

Data type: statistics dimension


A dimension or axis for the statistics panel.

One or more dimensions are combined in a graph, these combinations are called statistics categories.

Statistics dimensions are automatically generated for all card fields in a game that don't set show statistics to false.

Categories are also automatically generated from dimensions.


Property Type Default Description
name string required Name of this dimension, used as an axis label and a label for automatically generated categories.
description string "" A description of the dimension, currently not used.
position hint string 0 Hint for ordering dimensions.
icon filename Filename of an icon for this dimension.
script script required Script that generates a value for each card in the set.
numeric boolean false Is the value always a number?
bin size real number none For numeric dimensions: group numbers together into bins this large.
For example with bin size: 5, values 1 and 3 both get put under "1-5".
show empty boolean false Should cards with the value "" be included?
split list boolean false Indicates the value is a list of the form "item1, item2". The card is put under both items.
colors map of opaque colors Colors to use for specific values
groups list of strings Values to always show, and the order to show them in.


Automatically generated statistics dimensions look like this:

statistics dimension:
	name: power
	script: card.power

Specify a specific order and color of values, otherwise they are ordered alphabeticaly and groups with no cards are not shown:

statistics dimension:
	name: color
	script: card.color
	group: white
	group: blue
	group: black
	group: red
	group: green
		white: rgb(255,255,255)
		blue:  rgb(0,0,255)
		black: rgb(0,0,0)
		red:   rgb(255,0,0)
		green: rgb(0,255,0)