of     1   

Qwertygiy
#129227476Saturday, March 29, 2014 1:34 AM GMT

With the addition of name changing and data stores allowing leaderboards, one big problem has risen: If you store data via username and a player changes their name, they lose all their data. If you store data via userid, you get a list of boring numbers on leaderboards and people have to do some tedious searching to get the names of the people they're trying to beat. The only logical current work around is to have dual datastores for both userId and name, and save the data of the userid table to the name table. But this only works for leaderboards, and there are other reasons someone might want to turn names into ids or vice versa. I propose the following methods, of the Players service would be most logical. GetUsernameFromId(int id): Returns the current username of the player with the userId "id". GetUserIdFromName(string name): Returns the ID of the player who at any point used the username "name". GetAllNamesOfId(int id): Returns a table of all the usernames that the player with the userId "id" has ever had.
Despairus
#129233428Saturday, March 29, 2014 2:38 AM GMT

yes...Yes!! Brilliant idea!!! Support! Can never go wrong with adding more pre-made functions ;D
Manwich1
#129233705Saturday, March 29, 2014 2:42 AM GMT

Support
XenonLi
#129237009Saturday, March 29, 2014 3:21 AM GMT

the "at any point" made me angry can't previous names be used again? if not, support
ZhouJiang
#129238391Saturday, March 29, 2014 3:37 AM GMT

Support. "A man chooses, a slave obeys." - Andrew Ryan
Qwertygiy
#129264132Saturday, March 29, 2014 2:24 PM GMT

"The at any point part" A username can't be taken by another user if the original user changed away from it. It's reserved for that user. If "Bob123" changes his name to "Bob12345", only he can change his name back to "Bob123". Nobody else can register a new account under it, and nobody else can change their name to it.
Qwertygiy
#129297714Saturday, March 29, 2014 8:50 PM GMT

Bump. The way I am currently getting around this in my game is by using Data Stores. When a player enters the game, it saves their username to a DataStore with the userId as the key, and also saves their userId to a different DataStore with the username as the key. Then, on the leaderboard which stores the data per userId, there is a button they can click beside each userId to get the username. It's clunky and is only effective on one-person servers, plus it isn't retroactive -- the username cannot be retrieved for players who haven't played since I added that script.
GotMilkshake
#129298812Saturday, March 29, 2014 9:03 PM GMT

Support.
Qwertygiy
#129365092Sunday, March 30, 2014 1:51 PM GMT

Rebump.
Qwertygiy
#129586394Tuesday, April 01, 2014 11:12 PM GMT

Meowbump.
Qwertygiy
#130094860Monday, April 07, 2014 12:37 PM GMT

Kreebump. This shouldn't be a hard function to add at all.
DataStore
#130096263Monday, April 07, 2014 1:22 PM GMT

You can already get a person's username, from their ID, in at least two different ways: 1) You can use HttpService, and an API someone has created. 2) You can get a player's username through using the GetUserSets method, and then the creator name of their My Model set. I'd also like to point out that a 'GetUserIdFromName' method would be incredibly pointless, in my personal opinion. If you're going to use your DataStore example, then the place creator can simply check the userId property of the player in their game. No need for an additional method. Again, I disagree with your suggestion of 'GetAllNamesOfId'. Since the addition of HttpService you can already do this, and there are multiple sites out there offering ROBLOX APIs for getting this kind of information. Completely unneeded.
duck14
#130096552Monday, April 07, 2014 1:31 PM GMT

Support.
trogyssy
#130099257Monday, April 07, 2014 2:40 PM GMT

DataStore has a point. ===A message to all you price floor haters, courtesy of the ROBLOX mods: youtu.be/NPlXc7h5z4M===
Qwertygiy
#130462627Friday, April 11, 2014 11:31 PM GMT

DataStore also has a limit. You can only use it 60 + 10 * player times a minute. If you have 25 names on a scoreboard, you can't even scroll three times before you've used up the base limit and the player's limit, as well as sucked up other players'.
Qwertygiy
#130463156Friday, April 11, 2014 11:36 PM GMT

HTTPService has a similar limit, with similar problems.
InteWv
#130463452Friday, April 11, 2014 11:39 PM GMT

No support.
DataStore
#130527377Saturday, April 12, 2014 4:27 PM GMT

@Qwert, The issue with DataStores can be gotten around. You do not need to access the SAME bits of data over, and over, again within a small period of time. You point out a flaw with DataStores, yet people are using them for the exact purpose, of leaderboards, without any issues at all. HttpService has a limit per server not per place, of which you wouldn't exceed easily, so long as you don't keep requesting the same data over and over again - wasting your limit.
Qwertygiy
#130540133Saturday, April 12, 2014 6:28 PM GMT

I will take my example. Saved leaderboard: 1: UserID 3251851 2: UserID 43256262 3: UserID 4759254 4: UserID 9540263 5: UserID 20591433 To get the Username via DataStore, that's one usage for each page of 15 to get the data, and then that's one usage of GetAsync("usernames", userID) for each position. To get it via HTTPService, same thing, one usage per UserID.
Netprobe
#130542350Saturday, April 12, 2014 6:54 PM GMT

Full support.

    of     1