Jonius7 / SteamUI-OldGlory

A set of customisable Steam Library tweaks, with an installer. Also a reference that you can use to learn how to make your own tweaks.
https://jonius7.github.io
Apache License 2.0
252 stars 5 forks source link

Restore custom notification sound functionality ? #83

Open thestupidbox opened 1 year ago

thestupidbox commented 1 year ago

Hello,

It used to be possible on Steam to change all of the notification sounds (Friends, Message etc...) by replacing the sound files inside the "friends" and "resource" folder. Around 2018ish it seems that Valve made a launcher update where they not only changed the sounds, but they are also now loaded elsewhere (probably serverside as I cannot locate the new sounds anywhere on the steam directory) even though the old sound files are still present. As of today, I think it's impossible to have custom notification sounds unless you downgrade Steam to an earlier version.

So, would it be possible to find a way to replace and load custom notification sounds or restore "the old way" of loading notification sounds ?

Thanks !

Jonius7 commented 1 year ago

I had a look around and seems it isn't possible according to this: https://steamcommunity.com/discussions/forum/1/2789318172111960180/

Have you tried changing these files in friends or they don't change anything? 2023-03-20 14_19_21-friends

thestupidbox commented 1 year ago

I just tried it again on the latest Steam version with all of the sounds changed and set to read only and I found out that :

It seems like this has all to do with the chat update that only changed how the sounds in the friends menu are loaded so it's currently impossible to change those sounds unless someone can figure it out. Since there's a patch to modify the friends list css, maybe it's possible to make one that could bring back the old method of loading sounds in the friends list too. But then again idk much about how Steam works under the hood :/

PhantomGamers commented 1 year ago

You are correct that these are loaded server side now. They are loaded in the friends.js from https://community.akamai.steamstatic.com/public/javascript/webui/friends.js

With the sound files also being pulled from the web (e.g. ui_steam_message_old_smooth.m4a from https://community.akamai.steamstatic.com/public/sounds/webui/ui_steam_message_old_smooth.m4a )

These are then stored in Steam's chromium cache folder in %localappdata%/Steam/htmlcache/Cache

Sadly these are bundled into the data_# files which are collections that a bunch of smaller files get thrown into, and I've yet to figure out how to modify a specific file within them.

thestupidbox commented 1 year ago

Oh that's interesting info... I guess a workaround could be possible.

Since this is serverside, I personally first tried myself to have a janky solution using Fiddler (Classic) intercept those URLs with my custom ones but no luck. After adding autorequests and deleting the cache Steam either plays no sounds or still insists to use the newer ones because I guess Fiddler can't intercept Steam in time :/

But then, I browsed the cache on the data_# folder using ChromeCacheView and I found something interesting, the URLs that are linked to it are different. Which could just be the reason why my Fiddler solution didn't work at first. Just because the URL redirects were loaded from the wrong server.

image

So then I deleted the cache again, added new autorequests with this new URL and tried it again. This time Fiddler intercepted the URLs and the custom sounds worked ! It's by far not the ideal solution but it sure is a way to get the custom sounds manually saved and get used on Steam's Chromium cache. It's a careful process.

EDIT : ~Instead of waiting for a friend to go online, you can force Steam to manually cache those sounds on the `data#` cache folder by just using the game overlay web browser. I'm gonna personally do a backup of those cache files, just in case these sounds get replaced.~ Or just launch Steam with the dev parameter and use the console lol._

image

Jonius7 commented 1 year ago

So the question is, what can OldGlory do for you to help this process? AFAIK this is out of scope for something like OldGlory

thestupidbox commented 1 year ago

Well at first I thought that the way that determined how Steam loaded these sounds was locally stored and maybe something could've been done to patch and restore the way these sounds were loaded but it seems that now since the other friends.js (not the local one in the clientui folder) is loaded seperately and on Steam's servers, this would be trickier to find a solution and then implement it in OldGlory. Maybe this is something that more likely could be implemented in SFP and make it possible to use custom sounds. I use both of these tools anyway.