Hi, a lot of players from one of my games recommended that I build a leaderboard. The only issues are that I have:
never made a global leaderboard before and
use strings to save the currency data as it often exceeds the limits of int and number values (I have a custom in-house module script that handles all of the adding, subtracting, etc.)
My question is: Is there a way to make a global stat leaderboard while using the strings? I’ve considered saving the lengths of the strings, but then what if someone has 100 octillion, but someone else has 999 octillion?
Hypothetically you could now since DataStores have key listing functions but it’s not ideal since said listing functions do not include the value. One way or another you’ll see yourself back at OrderedDataStores or not having permanent leaderboards.
If you need to save a value of over 9.223Q, check out this trick:
This is a clever idea, though in the end, I’ve decided to use a normal data store with a single key that holds a table of tables containing the UserId and currencyamount, I’m going to keep it maxed out at 10 “entries”, It looks something like this (example):