1. #1
    Free Food!?!?! Tziva's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Cretaceous Period
    Posts
    22,827

    Way to throttle WA sounds?

    On my mage, I made a weakaura to let me know when something is spellstealable. The WA shows me the icon for the ability, the name, and plays an audio cue. However, I am finding the audio is driving me crazy when the mobs just chain apply the buff to themselves (or I'm doing rapid target swapping) as it just spams the sound repeatedly. I really don't want to have to disable the audio cues because they are the most useful part of these kind of WAs to me, but I'd love to be able to throttle them somehow.

    To be clear: I don't want to limit how often the WA itself triggers -- I want it to always let me know anytime there's something up that I can take -- but I'd really prefer if the audio itself only triggered, say, once every 10 seconds max, while still leaving the icon/name visible regardless of circumstances.

    Is there a way to do that?


    If helpful, here is the string: https://pastebin.com/jMfjAiv4

    Edit: pastebinned the string so it wasn't so obnoxious in the post itself.


    for moderation questions/concerns, please contact a global:

    TzivaRadux SimcaElysiaZaelsinoxskarmaVenara

    | twitch | bsky
    |

  2. #2
    In the On Show part of the Actions, where you selected a sound, use the Custom option and the following code:

    Code:
    if not WA_SS_THROTTLE then
        WA_SS_THROTTLE=true
        PlaySound( 2304 )
        C_Timer.After( 2 , function()
                WA_SS_THROTTLE=false
        end)
    end

    This will play the sound only once every 2 seconds. Change the PlaySound line and the number 2 to your liking.
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  3. #3
    Free Food!?!?! Tziva's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Cretaceous Period
    Posts
    22,827
    Thank you!


    for moderation questions/concerns, please contact a global:

    TzivaRadux SimcaElysiaZaelsinoxskarmaVenara

    | twitch | bsky
    |

  4. #4
    Free Food!?!?! Tziva's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Cretaceous Period
    Posts
    22,827
    Actually, added question: how do I identify the correct number for the sound I want to use if I'm not using the dropdown?


    for moderation questions/concerns, please contact a global:

    TzivaRadux SimcaElysiaZaelsinoxskarmaVenara

    | twitch | bsky
    |

  5. #5
    If it's a Blizzard sound, you can try searching the name on https://www.wowhead.com/sounds and use the number in the url once you find it. If it's a sound specific to WeakAuras, look for the sound in the WeakAuras install then use PlaySoundFile. If it's neither and a sound shared through LibSharedMedia, you need to find the addon that is providing the sound and find it in that addon's install.
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  6. #6
    Free Food!?!?! Tziva's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Cretaceous Period
    Posts
    22,827
    Quote Originally Posted by Kanegasi View Post
    If it's neither and a sound shared through LibSharedMedia, you need to find the addon that is providing the sound and find it in that addon's install.
    It is this, and it has a name, rather than a number. Do I put the name instead? Including .ogg? Do I need to put the file path for that dir?

    (fwiw it is "Spellsteal.ogg from ShadedMedia_Causeses)

    Thanks again and sorry for the incessant questions. Due to the nature of the WA, it's not particularly easy for me to test to fiddle with it myself until it works, or I would just do that.


    for moderation questions/concerns, please contact a global:

    TzivaRadux SimcaElysiaZaelsinoxskarmaVenara

    | twitch | bsky
    |

  7. #7
    This first half of the post is just extra info for your consideration in the future, you can skip to the second half if you want. Only Blizzard sounds have numbers. PlaySound accepts sound IDs, which are assigned numbers that sometimes uses multiple sounds. For example, a character's attack sound ID usually has different sounds assigned to it which play randomly. PlaySoundFile accepts file IDs, which are tracking numbers for all files in the game install, not just sounds. Each one of these numbers always has only one file, and if it's not a sound, nothing happens if you use it in PlaySoundFile.

    For example, the sound ID I used is 2304, which is a set of three mechanical wound sounds:


    Those three sounds can be located using wow.tools:


    File IDs 562730, 562733, and 562738.



    In your case, all files provided by addons aren't a part of the game install, so they have no file IDs assigned to them. Just plug in the file path of the addon file into PlaySoundFile:

    PlaySoundFile("Interface\\AddOns\\ShadedMedia_Causeses\\Spellsteal.ogg")

    File paths have to be absolute. The root of the path system is where Wow.exe is. You can even put a file in the main folder and play it like this:

    PlaySoundFile("Spellsteal.ogg")

    This will play the sound using the default SFX channel. If you have that channel low or have sound effects disabled, use the Master channel:

    PlaySoundFile("Interface\\AddOns\\ShadedMedia_Causeses\\Spellsteal.ogg","Master")

    The five channels are Master, SFX, Music, Ambience, and Dialog.

    Currently, if you want to add a sound file, you need to make sure it is at that location when the game client starts. In Shadowlands, they changed this behavior to allow files to be recognized when the UI loads, which is when you login to a character or use the /reload command.
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  8. #8
    @kanegasi

    I sometimes can't believe how incredibly helpful you are when questions like this come up. I have been trying to do something similar and this is really helpful. Thank You!

  9. #9
    Free Food!?!?! Tziva's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Cretaceous Period
    Posts
    22,827
    Awesome, thank you again!


    for moderation questions/concerns, please contact a global:

    TzivaRadux SimcaElysiaZaelsinoxskarmaVenara

    | twitch | bsky
    |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •