How do I convert back and forth between UniqueID and SteamID?
i think (and i could be wrong) that your unique id is the last part of your steamid eg
[code]
STEAM_0:0:1655138
would be
1655138
[/code]
so to convert just cut off or add on the STEAM_0:0:
Not quite. My SteamID is STEAM_0:1:16678762 and my UniqueID is 1592073762. The last 3 numbers are the same.
It could be 'cut the end off and add 1575395000', but I'm not sure why he'd do that.
It's not. My steam ID has nothing to do with my UniqueID. My guess is that they're unrelated.
[QUOTE=ZpankR;17300088]It's not. My steam ID has nothing to do with my UniqueID. My guess is that they're unrelated.[/QUOTE]
According to [url=http://wiki.garrysmod.com/?title=Player.UniqueID]The Wiki[/url] they are.
Nevermind :buddy:
It must have a weird algorithm then.
[QUOTE=Lexic;17300108]According to [url=http://wiki.garrysmod.com/?title=Player.UniqueID]The Wiki[/url] they are.[/QUOTE]
Perhaps SteamID relates to that particular user's account?
[QUOTE=Yobdren;17308708]Perhaps SteamID relates to that particular user's account?[/QUOTE]
...Your SteamID relates to your steam account? :O
Well Valve happens to use it interchangeably for your profile page and your identification number on steam, so maybe we do too?
[QUOTE=Yobdren;17308821]Well Valve happens to use it interchangeably for your profile page and your identification number on steam, so maybe we do too?[/QUOTE]
SteamID is not UniqueID and not ProfilepageID
Although with the right algorythm they are the same ... :3
[QUOTE=The-Stone;17318820]SteamID is not UniqueID and not ProfilepageID
Although with the right algorythm they are the same ... :3[/QUOTE]
Yeah we can convert a SteamID to and from a ProfilePageID, but not with an UniqueID. If there's a logic in the conversion process we don't know it yet.
I heard the UniqueID was a hash of your SteamID, but I'm not quite sure.
We all know it's a transform of your SteamID, we're just trying to find out what the transform [i]is[/i].
[QUOTE=Lexic;17333832]We all know it's a transform of your SteamID, we're just trying to find out what the transform [i]is[/i].[/QUOTE]
Well, we could always just compile a list of SteamID with corresponding UniqueIDs, then see what they all have in common. :P
[QUOTE=Unrealomega;17334202]Well, we could always just compile a list of SteamID with corresponding UniqueIDs, then see what they all have in common. :P[/QUOTE]
I've posted mine. What's yours? :3
Steam_0:0:17453525 - 670755050
You're unique id is different between servers. It has to do with specific characteristics of every server .-. The reason we have UniqueId is to give an ID that can only be valid on that server.
[QUOTE=Gbps;17338130]You're unique id is different between servers. It has to do with specific characteristics of every server .-. The reason we have UniqueId is to give an ID that can only be valid on that server.[/QUOTE]no it isn't.
[QUOTE=Lexic;17338624]no it isn't.[/QUOTE]
Yes, it is.
[QUOTE=Salads;17342403]Yes, it is.[/QUOTE]
It's not. I know this because my roleplay server stores everything in a database with the user's uniqueID as the primary key. As the database has survived multiple server reinstalls and even a hardware switch, UniqueID is clearly not based on what server you're on.
[editline]10:40PM[/editline]
Been through 3 IP changes too, if you were thinking of mentioning the server's IP.
UniqueID is indeed based on your SteamID. I remember reading a thread on this last year or so. Garry said the UniqueID should be used for data storage, so it is always the same for your account.
[QUOTE=Clavus;17343613]UniqueID is indeed based on your SteamID. I remember reading a thread on this last year or so. Garry said the UniqueID should be used for data storage, so it is always the same for your account.[/QUOTE]
Exactly, I suggest asking garry for a way to generate it.
[QUOTE=schumacher;17349306]Exactly, I suggest asking garry for a way to generate it.[/QUOTE]
If that's ever explained, someone update the Wiki with this information. :P Saves a lot of time. :3
Does anyone know the actual purpose of UniqueID? I mean it's just as unique to your account as a SteamID is, it's just slightly shorter.
[quote=http://wiki.garrysmod.com/?title=Player.UniqueID]This number is based off the IP for LAN servers, and the steamid for internet servers.
Since SteamIDs contain the ':' character, they cannot be used as a filename for file.Write. As UniqueIDs are just numbers, they can be. [/quote].
[QUOTE=Crazy Quebec;17352751]Does anyone know the actual purpose of UniqueID? I mean it's just as unique to your account as a SteamID is, it's just slightly shorter.[/QUOTE]
It's for the people who can't be bothered formatting a SteamID.
[QUOTE=Lexic;17333832]We all know it's a transform of your SteamID, we're just trying to find out what the transform [i]is[/i].[/QUOTE]
hash != transform
It's safe to say that anything you can do with a UniqueID is the same with SteamID.
SteamID sometimes returns 'STEAM_ID_PENDING' when ran from PlayerInitialSpawn. It is easily solved by delaying the hook, but it's still annoying. Is this the case with UniqueID as well?
[QUOTE=Nevec;17364679]SteamID sometimes returns 'STEAM_ID_PENDING' when ran from PlayerInitialSpawn. It is easily solved by delaying the hook, but it's still annoying. Is this the case with UniqueID as well?[/QUOTE]
This, and I would assume UniqueID would be less expensive than a string.
Sorry, you need to Log In to post a reply to this thread.