Raised This Month: $51 Target: $400
 12% 

[TF2] Custom Sounds not playing with Sm_Play


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vulpicula
New Member
Join Date: Aug 2019
Location: Canada
Old 08-29-2019 , 18:59   [TF2] Custom Sounds not playing with Sm_Play
Reply With Quote #1

Hello,

I've been attempting to get custom sounds working on my server, but they appear to not be. Not only are they not downloading, the server appears to be unable to find them at all.

The files are in a .wav format, at 44khz, which seems to be okay if other posts in this forum are to go by. The server is running on Linux, and I'm using an Amazon Web Server to host the FastDL (Which works just fine for the maps!)

The files themselves are located in the server's /tf/custom/presto/sound/ folder, with presto being the short form of the server name.

I have been using !sm_play to get these sounds to work, and the command seems to work just fine for vanilla audio, such as the game's main theme, and various voice lines. I've been using two methods to try and play the sounds, the first being !sm_play file.wav, and the second being !sm_play custom/presto/sound/file.wav, with various directories being tried (such as including tf or not.)

(Hopefully I've provided enough information for you guys to make heads or tails of the issue. Any help would be much appreciated! )

(Also, unrelated, but I figured I'd include this since it's my first post. Thank ye. This place has been a great resource already when it comes to getting plugins, and fixing issues. ^^)

Last edited by Vulpicula; 08-29-2019 at 19:01.
Vulpicula is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 08-30-2019 , 00:20   Re: [TF2] Custom Sounds not playing with Sm_Play
Reply With Quote #2

Thanks for being thorough!

Make sure the file is being precached and added to the server's download table. The game doesn't do that automatically for custom assets (custom maps work barring a very particular edge case). The least-hassle way to do that would be to grab this plugin (and check the starting post on how to configure it; you'll want to specify it as if it wasn't under a custom directory). Reloading the plugin and changing the map is important if you're configuring it while the server is running.

On the fastdl side, make sure that the file is under /sound/file.wav and not /custom/presto/sound/file.wav. May be obvious that the fastdl doesn't recognize custom directories, but just in case.

sm_play file.wav should work afterwards, but I might be missing something. I'd also recommend putting them in a unique subdirectory under sound/ if they aren't already.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 08-30-2019 at 00:24.
nosoop is offline
Vulpicula
New Member
Join Date: Aug 2019
Location: Canada
Old 08-30-2019 , 02:17   Re: [TF2] Custom Sounds not playing with Sm_Play
Reply With Quote #3

Quote:
Originally Posted by nosoop View Post
Thanks for being thorough!

Make sure the file is being precached and added to the server's download table. The game doesn't do that automatically for custom assets (custom maps work barring a very particular edge case). The least-hassle way to do that would be to grab this plugin (and check the starting post on how to configure it; you'll want to specify it as if it wasn't under a custom directory). Reloading the plugin and changing the map is important if you're configuring it while the server is running.

On the fastdl side, make sure that the file is under /sound/file.wav and not /custom/presto/sound/file.wav. May be obvious that the fastdl doesn't recognize custom directories, but just in case.

sm_play file.wav should work afterwards, but I might be missing something. I'd also recommend putting them in a unique subdirectory under sound/ if they aren't already.
Thanks for the response! I've grabbed the plugin and set it up using both the posts, and there appears to be a new development. The files are now downloading, and wind up in my /tf/download/sound folder. However, attempting to use !sm_play @all file.wav results in the following error in console.
Code:
Failed to load sound file.wav", file probably missing from disk/repository
Trying the command with the file location (custom/sound/file.wav, download/sound/file.wav, tf/download/sound/file.wav) does not work either.

Last edited by Vulpicula; 08-30-2019 at 02:18.
Vulpicula is offline
Vulpicula
New Member
Join Date: Aug 2019
Location: Canada
Old 08-30-2019 , 05:26   Re: [TF2] Custom Sounds not playing with Sm_Play
Reply With Quote #4

Okay, disregard that last post, turns out the issue was something more... peculiar, yet easier to fix. Turns out something is setting my server to sv_pure 2, despite me setting it as sv_pure 0 in the server.cfg.

...why this is happening, I don't know, but the sounds work when I set it to sv_pure -1 or sv_pure 0 manually.

Either way, thank you for helping me solve this. Wouldn't have known about the download plugin otherwise.

Last edited by Vulpicula; 08-30-2019 at 05:26.
Vulpicula is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 08-30-2019 , 14:54   Re: [TF2] Custom Sounds not playing with Sm_Play
Reply With Quote #5

Ah, yeah. I have +exec server.cfg in my server's launch options because of that quirk.

Glad you've sorted the issue out!
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode