WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Using different sound files for certain effects (https://www.wowinterface.com/forums/showthread.php?t=59762)

Eommus 01-15-24 01:17 AM

Using different sound files for certain effects
 
Hi,

Some years ago, the following was working, but it seems to no more:

To disable the sound effects that you hear when you select or deselect an NPC, I used to put two empty sound files like this

C:\World of Warcraft\_retail_\Sound\Interface\ideselecttarget.ogg
C:\World of Warcraft\_retail_\Sound\Interface\iselecttarget.ogg

But it's not working now, I still hear the select/deselect sound effects. Any ideas how to achieve what I want?

Thanks!

LudiusMaximus 01-16-24 01:12 PM

Have you tried this?
https://www.wowinterface.com/forums/...688#post325688

What you have to do is to find the event that happens when you select or deselect an NPC.

SDPhantom 01-17-24 01:46 AM

The lines responsible for playing the target select and lost sounds are here
https://github.com/Gethe/wow-ui-sour....lua#L172-L178
https://github.com/Gethe/wow-ui-sour...Frame.lua#L258

There's also an API function for muting specific sounds by either path or FileID.
MuteSoundFile()

Taking the SoundKitIDs and looking up their FileIDs, these calls should do the trick.
Lua Code:
  1. MuteSoundFile(567453);
  2. MuteSoundFile(567520);

Dridzt 01-17-24 02:30 AM

I have a feeling only calls to
Code:

PlaySoundFile
respect
Code:

MuteSoundFile
and not PlaySound.

But maybe that's a classic client quirk, I don't know how retail behaves.

SDPhantom 01-17-24 02:55 PM

Considering MuteSoundFile() works for C-side calls too (you can mute creature sounds with it), I think it'll be fine.

Sharpedge 01-17-24 03:01 PM

This is what I use. It's to keep those pesky sounds from the YakVendor mount quiet.

Code:

local soundKitIDs = {
    640336, 640338, 640340,
    640314, 640316, 640318, 640320,
    640180, 640182, 640184,
    640158, 640160, 640162, 640164
}

local frame = CreateFrame("Frame")

frame:RegisterEvent("PLAYER_LOGIN")
frame:SetScript("OnEvent", function(self, event, ...)
    if event == "PLAYER_LOGIN" then
        for _, id in ipairs(soundKitIDs) do
            MuteSoundFile(id)
        end
    end
end)


SDPhantom 01-17-24 03:54 PM

In all honesty, you don't need to wait for events to fire to use MuteSoundFile(). You can call it from the main chunk. Also, SoundKitIDs can map to multiple FileIDs in which a random one is picked at call. They're not interchangeable.
Lua Code:
  1. for _,fileid in ipairs({
  2.     640336, 640338, 640340,
  3.     640314, 640316, 640318, 640320,
  4.     640180, 640182, 640184,
  5.     640158, 640160, 640162, 640164
  6. }) do MuteSoundFile(fileid); end

Sharpedge 01-17-24 05:43 PM

Quote:

Originally Posted by SDPhantom (Post 343200)
In all honesty, you don't need to wait for events to fire to use MuteSoundFile(). You can call it from the main chunk. Also, SoundKitIDs can map to multiple FileIDs in which a random one is picked at call. They're not interchangeable.
Lua Code:
  1. for _,fileid in ipairs({
  2.     640336, 640338, 640340,
  3.     640314, 640316, 640318, 640320,
  4.     640180, 640182, 640184,
  5.     640158, 640160, 640162, 640164
  6. }) do MuteSoundFile(fileid); end

Ahh, ok. I will give that a shot. Thank you.

Eommus 01-19-24 05:17 AM

Thank you all, using SDPhantom's code, I made a simple addon to mute those select/deselect sounds. I will be adding more sound IDs if/when I stumble into sounds I do not want to hear.

Though, I didn't quite understand how you take the SoundKitIDs and look up their FileIDs.

SDPhantom 01-19-24 05:23 PM

There's a lookup table in the DBC files. Currently, WoW.Tools is the only site I can find with complete info though it's been discontinued since Dec 2022.

https://wow.tools/dbc/?dbc=soundkitentry

Dridzt 01-20-24 04:55 AM

Quote:

Originally Posted by SDPhantom (Post 343212)
There's a lookup table in the DBC files. Currently, WoW.Tools is the only site I can find with complete info though it's been discontinued since Dec 2022.

https://wow.tools/dbc/?dbc=soundkitentry

https://wago.tools/ is the spiritual successor.

SDPhantom 01-20-24 08:44 AM

Quote:

Originally Posted by Dridzt (Post 343214)
https://wago.tools/ is the spiritual successor.

It didn't have the SoundKitIDs listed when I tried to use it earlier.
Seems to be there now.

Eommus 01-20-24 09:52 AM

Thanks a lot!


All times are GMT -6. The time now is 07:49 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI