Valve changing up their SteamID format, urh....

General discussion for off-topic subjects.
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Valve changing up their SteamID format, urh....

Postby Doldol » Thu Oct 30, 2014 6:12 pm

In case you didn't know:
Basically Valve decided to break with the way SteamIDs are displayed. It's apparently called SteamID3.
They've already implemented this in TF2, silently without any official word what-so-ever. So other games might follow (I think it's likely).

Big discussion @ https://forums.alliedmods.net/showthread.php?t=246705

Example: from STEAM_0:1:48287056 to [U:1:96574113]

How to convert:
Old = STEAM_0:A:B
New = [U:1:B*2+A]
Example: STEAM_0:1:1234 -> [U:1:2469]



Source: https://forums.alliedmods.net/showthread.php?t=248632
Predz
Senior Member
Posts: 158
Joined: Wed Aug 08, 2012 9:05 pm
Location: Bristol, United Kingdom

Postby Predz » Fri Oct 31, 2014 1:24 am

Ye I saw this a while back and realized that at some point databases in event-scripts would need to be updated or just reset. So I made a quick function in python that converts them for you, I have added it below if you want to use it.

Syntax: Select all

def convert(id):
if isinstance(id, str):
arg = id.split('_')
args = id.split(':')
if arg[0] == 'STEAM':
if len(args) == 3:
return '[U:1:'+str(int(args[2])*2+int(args[1]))+']'

Return to “Whatever”

Who is online

Users browsing this forum: No registered users and 24 guests