Stats by Heroes on Dungeon Roll

Game development with Board Game Arena Studio
Post Reply
User avatar
MGoulet
Posts: 54
Joined: 20 September 2014, 13:17

Stats by Heroes on Dungeon Roll

Post by MGoulet »

Hi,

I would like to know if it's possible to use stats.inc.php to have stats by heroes (Number of times selected and average score with this hero).

In the documentation, we have to initStat to add stat to the game. But is it possible to only add a stats if the hero is present?

For example :
Table 1, Hero A and B is taken. Player 1 use Hero A and get a score of 25. Player 2 use Hero B and get a score of 20.
Table 2, Hero A and C is taken. Player 1 use Hero A and get a score of 14. Player 2 use Hero B and get a score of 30.

I want a stat (sum) of Hero A, B and C taken and a score average by hero like stats usually do but only for the player who take the hero.

What happen if a stat is not init for a player?
Should I use Table Stat instead of Player Stats?

I would like to know if an hero is taken more / less often then others.

Hope I was clear enough.
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: Stats by Heroes on Dungeon Roll

Post by Tisaac »

If you are not initializing the stat, it will display NaN at the end, which should prevent him to count in the aggregate statistics of players.
Sadly, there are no better way to do this at the moment.
Post Reply

Return to “Developers”