Fix SteamIDs for the new update
This will convert the new value to the old, allowing all of your current stats to be saved.
In scripts/HLstats_EventHandlers.plib, find Code:
$owner =~ /.+?<STEAM_[0-9]+:([0-9]+:[0-9]+)>.*/; Code:
$owner =~ s!\[U:1:(\d+)\]!'STEAM_0:'.($1 % 2).':'.int($1 / 2)!eg; Code:
$uniqueid =~ s/^STEAM_[0-9]+?\://; Code:
$uniqueid =~ s!\[U:1:(\d+)\]!'STEAM_0:'.($1 % 2).':'.int($1 / 2)!eg; Code:
$uniqueid =~ s/^STEAM_[0-9]+?\://i; Code:
$uniqueid =~ s!\[U:1:(\d+)\]!($1 % 2).':'.int($1 / 2)!eg; |
Re: Fix SteamIDs for the new update
Works like a charm. Thanks!
|
Re: Fix SteamIDs for the new update
I'd try this but I'm sure they will release an update tomorrow or sometime this weekend.
|
Re: Fix SteamIDs for the new update
Quote:
We apologize for the lack of warning regarding the SteamID format change in today's update. It was our intent to give the community a heads-up before the change was released, but it was missed. The change was made to update TF2 to use the current SteamID format, which most other games on Steam and Steam itself uses. You will find that you can now use SteamIDs rendered by these other locations in your interactions with the engine. The engine will still recognize the old format, though, so your current server ban lists should still be valid. The conversion equation has already been posted by a community member, but here it is again: Old: STEAM_0:A:B New: [U:1:B*2+A] Example: STEAM_0:1:1234 ---> [U:1:2469] We're sorry for the problems this may cause while you update your scripts to use the new format. It was not our intent to disrupt your servers. -Eric |
Re: Fix SteamIDs for the new update
The newest 1.6 SM snapshot has fixed this. Anyone who converted their admins' steam ids is out of luck. You should have waited for the SourceMod team to put out a fix.
|
Re: Fix SteamIDs for the new update
Quote:
How about converting entire HLXCE databases to new format and use new IDs? |
Re: Fix SteamIDs for the new update
Thanks for this quick fix!
Now my TF2 servers have stats working again, and my other servers log properly too |
Re: Fix SteamIDs for the new update
Quote:
This is more of a quick patch to just make it work. |
Re: Fix SteamIDs for the new update
Quote:
I know you are busy but I just need to figure out if this is doable in a easy manner or what needs to be done either way. https://forums.alliedmods.net/showthread.php?t=244891 |
Re: Fix SteamIDs for the new update
This is awesome, thank you
|
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
Is this supposed to change old steam IDs to the new ID?
|
Re: Fix SteamIDs for the new update
Another solution: update old SteamIDs to new format right in the database.
I wrote PHP-script to update old SteamIDs to new ones (in order to use that change $DB* vars accordingly) for TF2-related stats: Code:
<?php |
Re: Fix SteamIDs for the new update
I added the changes in the original post after I updated sourcemod. The hlstats daemon will not continue running now.
Code:
**:/**/scripts$ ./run_hlstats start If I check the status, Code:
**:/**/scripts$ ./run_hlstats status |
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
Quote:
You're definitely right! I've made corrections to my original post, thanks for notice. Quote:
|
Re: Fix SteamIDs for the new update
You can update hlstats to use the new format internally by running this SQL command
Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=SUBSTR(uniqueId, 1, 1)+SUBSTR(uniqueId, 3)*2 WHERE uniqueId REGEXP('[01]:[0-9]+') Code:
$uniqueid =~ /^\[U:1:(\d+)\]/; |
Re: Fix SteamIDs for the new update
Quote:
The cosmetic stuff is includes things such as the display of steam IDs incorrectly on-screen (with "Steam:0" prefixed - regardless of whether it is a Steam2 or Steam3 format ID in the database for that particular game), and linking to Steam profiles where the Steam ID in the database is updated to the Steam3 format. Personally, I can live with the cosmetic stuff - until there is an "official" update to deal with that stuff - rather than hack it up myself. Quote:
So, I would assume that eventually all Valve titles that are using some Source-engine variant will be converting to this new format, and eventually mods based on Source-engine will get forced over to it as well. It wouldn't surprise me if Valve did the same thing for all Valve titles using the old GoldSrc-engine too - in which case AMX-Mod-X will likely need to be similarly patched to accommodate the change. At the moment, from what I see my GoldSrc-engine games (HL1, TFC, Counter-Strike, DMC, and some mods) are still using the old format. |
Re: Fix SteamIDs for the new update
I'm assuming that these "cosmetic" issues would include a players stats page not showing their avatar?
|
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
can any body teach me....how to run that php script... I m not programmer.....thanks...
|
Re: Fix SteamIDs for the new update
Just get Sourcemod snapshot 4558 and use the old steam ids.
|
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
I'm using 4559 and it works fine
|
Re: Fix SteamIDs for the new update
Quote:
PHP Code:
|
Re: Fix SteamIDs for the new update
I'm surprised the HLStats team hasn't released an update to this yet... I'm really not wanting to do patch work on something that is normally been supported well.
|
Re: Fix SteamIDs for the new update
Quote:
Checking these things takes time, this has happened about a week ago...so I have not had a weekend yet to work on it..... I did not plan for HLX to have any major changes to the current code so I don't know it very well (To be clear I know what it does as a whole but what parts do what function not so much); So if the changes in this thread conflict create bugs it will be even longer before you see a "release" fix... Be happy that I am at least trying to keep this project alive, if you want to see it move faster // have more active support then the community is going to have to step up....This project does not pay the bills so my job comes first.... |
Re: Fix SteamIDs for the new update
About HLStatsX and SM snapshot (4559) with converting to the old IDs: is it enough to use snapshot for stats gets normal or the patch from the 1st post must be applied too?
I'm watching one server that use the SM from snapshot and stats is going crazy: every player has a clone, server list shows players twice, and some score goes to one player record (old ID), some to new one :) I wonder it's because of new IDs that left in the hlstats_PlayerUniqueIds table, or because of SM utilizing both ID formats... |
Re: Fix SteamIDs for the new update
Quote:
Listen...I'll be blunt as well. I said TEAM - I'm unaware or was unaware it was only you working on it. You act as if I'm attacking you or the project and that is far from it. I understand all to well about a full time job coming first but don't sit here and react like this when this wasn't my intentions and I'm sure others didn't intend to come off that either. If you want help from the community then make a sticky post about it rather wait till someone inquires about a issue and you go off on them with whatever reasons you have. I use this project and enjoy it...but speak up a little...if the support isn't there then that is fine but you gotta let people know so they can make decisions to do something else or wait. |
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
Quote:
If its needed people will lend a hand? well first let me point out that Maverick only took over the project because the original team who worked on it moved on to other things and with life and HE didnt want it to die. As such i guess its something to point out (which should be obvious to anyone with knowledge enough to be able to help knows) the project is hosted on BitBucket meaning anyone who wants to help has complete ability to add to the project by cloning the project and making pull requests with their changes. Something that seeing as noone has done this, it seems that most people who is able to do something mealy doesn't care about this project. |
Re: Fix SteamIDs for the new update
HLstats needs to be rewritten from the ground up. The code is not pretty or efficient, that's why no one is forking it.
I would rewrite it myself but I don't really have the time and I can't justify it given how poorly community servers are being treated by Valve now. I've already provided the code you need to switch to the new SteamIDs though. |
Re: Fix SteamIDs for the new update
Quote:
|
Re: Fix SteamIDs for the new update
Quote:
I do think Bot is right though, some form of a rewrite would be beneficial. Currently, I'll try to explain this in the least confusing way possible, my hlstats is using the old steam ID format but it has given players a NEW steam ID with the old format but it somehow linked the old to the new. Sourcebans for example is still tracking their old steam IDs but the hlstats changes we made are making it work strangely BUT IT DOES WORK, even if it isn't pretty. |
Re: Fix SteamIDs for the new update
Ok I used the changes in the first post just because I figure what the hell.... now when I see notices of points in the game sometimes it shows the original stats numbers of the player on some kills and whatever and on others it appears as if it tried to restart them?
|
Re: Fix SteamIDs for the new update
The code in the first post converts steam3 to steam2.
My fixes assume steam3 everywhere. If you want to convert steam2 to steam3 I think you can use something like this instead. I haven't tested this yet so it might have some syntax errors. Code:
$uniqueid =~ s!STEAM_0:([01]):(\d+)!'[U:1:'.int($1)+int($2)*2.']'!eg; |
Re: Fix SteamIDs for the new update
Hello!
Please help me I did everything Nikkii sent but did not work the players continue to appear two times in the Hlstasx page. Best Regards |
Re: Fix SteamIDs for the new update
Quote:
Assuming you prefer old SteamIDs, you should get rid of player records stored with new SteamIDs meanwhile, by query like this: Code:
DELETE FROM hlstats_PlayerUniqueIds WHERE INSTR(uniqueId, 'U') > 0 |
All times are GMT -4. The time now is 11:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.