Spine Tutorial 7 – Statistics

Requirements

Introduction

This tutorial covers how you can collect some custom statistics via Spine. They can help to analyze how players play and even help balancing your game.

Collecting Statistics

To collect the statistics, you need to enable the SPINE_MODULE_STATISTICS. When that’s done, call Spine_UpdateStatistic whenever you want to update a statistic. It’s good to not call it that frequently, e.g. only when changing the chapter. But that depends on the statistics you’re collecting.

Spine_UpdateStatistics requires four parameters. Basically that’s just a tuple of values you can use for whatever you want to somehow group them. You can use default values if you don’t need that much separation.

The first parameter is an identifier, e.g. the current chapter of the player. The second one can be the guild, while the third one is a string and used as another identifier. And the fourth one is the value of the statistic. An example how to use can be found in Spine_Statistics_UserDefined.d. In Xeres’ Return we used it to check what skills/attributes players have for different chapter/guild combinations.

Inspecting Statistics

To have a look on the statistics, open the Management dialog in the Spine client and just switch to the Custom Statistics tab. There you can select the different identifiers and see the results.