I have a working Team leaderboard but I'm having a hard time understanding how to add extra partitions to these Team leaderboards (e.g. having Team Leaderboards by country):
For normal (individual player) leaderboards this can be done by adding a field (e.g., COUNTRY) to the Leaderboard configuration, which is set to PARTITION as the Group calc. This works brilliantly.
For Team leaderboards I have to define a custom Running Total, but in this custom Running Total I cannot do the same: I can select the "COUNTRY" field but there is no way to indicated that this should be a partition (e.g. a "Partition" or "Group" choice under the "Summary Type" dropdown).
The custom Running Total does include a "Group" multiselect, I thought this would allow the Team leaderboard to be grouped/partitioned using selected values, but checking "COUNTRY" here doesn't seem to have any effect. What does this multiselect do?
I would be helped by any documentation / example for partitioning Team leaderboards by e.g. country.
So after some trial and error I found out I can achieve the desired partitioning and thought I'd share my solution:
Define "COUNTRY" as String property in event with default calc "Grouped"
Add "COUNTRY" as an additional summary/property to the custom Running Total. You have to select a default calc here as well but it doesn't seem to matter which one you choose. Let's choose for instance "Last".
Within the Running Total configuration, in the "Group" (portal2: "Group By:") multiselect, check "COUNTRY" so that it can be used for grouping.
In the Leaderboard configuration, add "LAST-COUNTRY" as a field and set its Group to "PARTITION"
One slightly annoying but perfectly workable consequence of this solution is that the name of the partitioning key will be prefixed with the default calc that you _have_ to select in the Running total, so it will for instance be LAST-COUNTRY or SUPPLEMENTAL-COUNTRY rather than just COUNTRY. I recommend you call your property RY and choose the "Count" default calc so the partitioning key becomes COUNT-RY ;-)
So yeah, the key for me was to check the COUNTRY property in the "Group"/"Group By:" multiselect which enables its grouping property to be set as "PARTITION" in the Leaderboard (otherwise it remains grayed out).
So after some trial and error I found out I can achieve the desired partitioning and thought I'd share my solution:
Define "COUNTRY" as String property in event with default calc "Grouped"
Add "COUNTRY" as an additional summary/property to the custom Running Total. You have to select a default calc here as well but it doesn't seem to matter which one you choose. Let's choose for instance "Last".
Within the Running Total configuration, in the "Group" (portal2: "Group By:") multiselect, check "COUNTRY" so that it can be used for grouping.
In the Leaderboard configuration, add "LAST-COUNTRY" as a field and set its Group to "PARTITION"
One slightly annoying but perfectly workable consequence of this solution is that the name of the partitioning key will be prefixed with the default calc that you _have_ to select in the Running total, so it will for instance be LAST-COUNTRY or SUPPLEMENTAL-COUNTRY rather than just COUNTRY. I recommend you call your property RY and choose the "Count" default calc so the partitioning key becomes COUNT-RY ;-)
So yeah, the key for me was to check the COUNTRY property in the "Group"/"Group By:" multiselect which enables its grouping property to be set as "PARTITION" in the Leaderboard (otherwise it remains grayed out).
Best regards,
Ivo
Customer Support
said
almost 6 years ago
Hi Ivo,
Apologies for the delayed response here. I think you may have figured out the best way to do this currently. I'll play around with the config also and share my results.
Regards,
Liam
A
Alexey K
said
almost 5 years ago
Works wrong if Team's country is changed: adds new team leaderboard record with new score.
And after second change to the first country the first team record continues and it score advances, but not the last record score.
S
Sebastian Sledz
said
almost 5 years ago
Make sure you have selected country in "group by". In other case if you have selected "calculation type" to "last" last event will override previous value in running totals for team, if you have selected additional group by entries in DB will be splited by team id and for example country.
Also you can check side effects different options in data explorer - it's best known tool to discover how running totals and leaderboards works with different configurations. ;)
Ivo Swartjes
Hi,
I have a working Team leaderboard but I'm having a hard time understanding how to add extra partitions to these Team leaderboards (e.g. having Team Leaderboards by country):
Best regards,
Ivo
So after some trial and error I found out I can achieve the desired partitioning and thought I'd share my solution:
One slightly annoying but perfectly workable consequence of this solution is that the name of the partitioning key will be prefixed with the default calc that you _have_ to select in the Running total, so it will for instance be LAST-COUNTRY or SUPPLEMENTAL-COUNTRY rather than just COUNTRY. I recommend you call your property RY and choose the "Count" default calc so the partitioning key becomes COUNT-RY ;-)
So yeah, the key for me was to check the COUNTRY property in the "Group"/"Group By:" multiselect which enables its grouping property to be set as "PARTITION" in the Leaderboard (otherwise it remains grayed out).
Best regards,
Ivo
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstIvo Swartjes
So after some trial and error I found out I can achieve the desired partitioning and thought I'd share my solution:
One slightly annoying but perfectly workable consequence of this solution is that the name of the partitioning key will be prefixed with the default calc that you _have_ to select in the Running total, so it will for instance be LAST-COUNTRY or SUPPLEMENTAL-COUNTRY rather than just COUNTRY. I recommend you call your property RY and choose the "Count" default calc so the partitioning key becomes COUNT-RY ;-)
So yeah, the key for me was to check the COUNTRY property in the "Group"/"Group By:" multiselect which enables its grouping property to be set as "PARTITION" in the Leaderboard (otherwise it remains grayed out).
Best regards,
Ivo
Customer Support
Hi Ivo,
Apologies for the delayed response here. I think you may have figured out the best way to do this currently. I'll play around with the config also and share my results.
Regards,
Liam
Alexey K
Works wrong if Team's country is changed: adds new team leaderboard record with new score.
And after second change to the first country the first team record continues and it score advances, but not the last record score.
Sebastian Sledz
Also you can check side effects different options in data explorer - it's best known tool to discover how running totals and leaderboards works with different configurations. ;)
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics