I spent some time looking at Valve's server browser and I wanted to suggest a way you could maybe integrate it with CS2Browser. I'm also just writing down everything I found for reference in case someone else ends up Googling for things similar to this.
Notes:
For Windows, Valve's server browser stores the favorites and history here:
C:\Program Files (x86)\Steam\userdata\<your Steam AccountID>\7\remote\serverbrowser_hist.vdf
appid, accountid (it's the server owner's I think), and LastPlayed can all be made 0, it doesn't actually make any difference in the server browser for CS2 currently. CS2 server entries are actually never even added to your history (but it works with most other games), and there isn't even a column for LastPlayed in the UI. accountid is automatically filled out when you do a search in the browser, and appid is never filled out because the browser just gets that every time it refreshes a server list
There's also a lastupdate timestamp (sec) field at the bottom after favorites and history, but you can just delete it, it doesn't seem to make a difference because the server browser just automatically loads the file regardless when Steam starts. Maybe it's used for syncing with the cloud or something though
The server entry key names (1, 2, 3, etc) also don't seem to matter at all... don't need to be in order, can have duplicates/clashes, and can be sparse/have some skipped numbers. Any time you add or remove a server through the UI, it automatically renumbers and consolidates all of them. So if you want to just "add" some servers to your existing favorites/history (which should be numbered like 1-50 etc), you can just add some entries with numbers starting at 5000, 5001, 5002, etc, and they'll automatically be renumbered next time you add/remove a server through the UI
There's also a config file that saves some of the state for the server browser filters here, it's pretty simple:
C:\Program Files (x86)\Steam\userdata\<your Steam AccountID>\config\serverbrowser_ui.vdf
Then there's also what seems to be config files (some for specific screen resolutions) for the state of the visible columns and column sortings (under the Servers key):
C:\Program Files (x86)\Steam\config\DialogConfig.vdf
That looks like the default one, and the resolution specific ones are in the same folder. I've tried making edits to these files but the server browser just seems to ignore all of my changes so far. Column visibility seems to be reset every time Steam starts, and might not be able to be changed through the UI or the config files. Would be nice to have "Bots" be visible by default.
Exporting to Steam:
So an obvious idea would be to have the CS2Browser website have an "Export" or "Download" button for either a performed server search, or for your favorited servers. It'd just take all the IP addresses and format them into a serverbrowser_hist.vdf file.
Then once downloaded, maybe it could show a popup window that shows or lets the user copy/paste the location they need to save it to. And that they need to restart Steam afterwards.
This might be absurd, but could try writing a shell command they can copy/paste to automatically move it there/update it. Steam's install location can be gotten from the registry with a command, and if they're not logged into CS2Browser with Steam you can probably find their Steam AccountId with C:\Program Files (x86)\Steam\config\loginusers.vdf or something similar. Insert the new servers into serverbrowser_hist.vdf under the favorites/history keys with random numbers.
Importing from Steam
Basically, show the user where their serverbrowser_hist.vdf file should be, have them upload it, parse all the IP addresses, match them against existing ones in CS2Browser, and favorite them for the user.
Just some ideas and information I wanted to get out there. Might not be that feasible/practical, but here's all the info in case anyone wants to try to do something with it... since Valve seems to not care about the server browser whatsoever.
thanks for your contribution, one of the problems I see with this is that you would lose all previously played servers and it is also unclear to me if Steam updates this file internally with the Steam Cloud.
I spent some time looking at Valve's server browser and I wanted to suggest a way you could maybe integrate it with CS2Browser. I'm also just writing down everything I found for reference in case someone else ends up Googling for things similar to this.
Notes:
For Windows, Valve's server browser stores the favorites and history here:
C:\Program Files (x86)\Steam\userdata\<your Steam AccountID>\7\remote\serverbrowser_hist.vdf
It's formatted like this:
appid
,accountid
(it's the server owner's I think), andLastPlayed
can all be made 0, it doesn't actually make any difference in the server browser for CS2 currently. CS2 server entries are actually never even added to your history (but it works with most other games), and there isn't even a column forLastPlayed
in the UI.accountid
is automatically filled out when you do a search in the browser, andappid
is never filled out because the browser just gets that every time it refreshes a server listlastupdate
timestamp (sec) field at the bottom afterfavorites
andhistory
, but you can just delete it, it doesn't seem to make a difference because the server browser just automatically loads the file regardless when Steam starts. Maybe it's used for syncing with the cloud or something thoughThere's also a config file that saves some of the state for the server browser filters here, it's pretty simple:
C:\Program Files (x86)\Steam\userdata\<your Steam AccountID>\config\serverbrowser_ui.vdf
Then there's also what seems to be config files (some for specific screen resolutions) for the state of the visible columns and column sortings (under the
Servers
key):C:\Program Files (x86)\Steam\config\DialogConfig.vdf
That looks like the default one, and the resolution specific ones are in the same folder. I've tried making edits to these files but the server browser just seems to ignore all of my changes so far. Column visibility seems to be reset every time Steam starts, and might not be able to be changed through the UI or the config files. Would be nice to have "Bots" be visible by default.
Exporting to Steam:
So an obvious idea would be to have the CS2Browser website have an "Export" or "Download" button for either a performed server search, or for your favorited servers. It'd just take all the IP addresses and format them into a
serverbrowser_hist.vdf
file.C:\Program Files (x86)\Steam\config\loginusers.vdf
or something similar. Insert the new servers intoserverbrowser_hist.vdf
under the favorites/history keys with random numbers.Importing from Steam
Basically, show the user where their
serverbrowser_hist.vdf
file should be, have them upload it, parse all the IP addresses, match them against existing ones in CS2Browser, and favorite them for the user.Just some ideas and information I wanted to get out there. Might not be that feasible/practical, but here's all the info in case anyone wants to try to do something with it... since Valve seems to not care about the server browser whatsoever.