Bagnon

Bagnon

124M Downloads

7.3 Sound Problem

yoshimo opened this issue ยท 33 comments

commented

Looks like they changed something with the soundsystem:

Date: 2017-08-26 19:19:33 ID: 8 Error occured in: Global Count: 1 Message: ...s\Bagnon\external\Wildpants\components\frameBase.lua line 17: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback]) Debug: [C]: PlaySound() ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: OnShow() ...s\Bagnon\external\Wildpants\components\inventory.lua:12: ...s\Bagnon\external\Wildpants\components\inventory.lua:11 [C]: Show() ..\FrameXML\UIParent.lua:2928: ShowUIPanel() ...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:54: ...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:50 (tail call): ? (tail call): ? ...s\Bagnon\external\Wildpants\features\autoDisplay.lua:133: ...s\Bagnon\external\Wildpants\features\autoDisplay.lua:131 [C]: ToggleBag() ..\FrameXML\MainMenuBarBagButtons.lua:21: BagSlotButton_OnClick() [string "*:OnClick"]:4: [string "*:OnClick"]:1 Locals: (*temporary) = "igBackPackOpen"

commented

And what exactly is the problem? Thank you for just posting a statement. Sarcasm intended.

commented

the problem is that the addon seems to be not working.
The only error i have is this.

commented

Thank you for the clarification.

commented

That error is not the first one you had (ID 8 I see). You must scroll back to the first error, only the first is relevant (errors create further errors).

commented

Might not even be Bagnon related

commented

If we disable everything but bagnon and swatter the message still shows.

commented

What is the first error?

commented

First and only error:

Message: ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
Time: 08/28/17 21:24:25
Count: 1
Stack: ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
[C]: ?
[C]: in function PlaySound' ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: in function OnShow'
...s\Bagnon\external\Wildpants\components\inventory.lua:12: in function <...s\Bagnon\external\Wildpants\components\inventory.lua:11>
[C]: in function Show' Interface\FrameXML\UIParent.lua:2928: in function ShowUIPanel'
...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:54: in function <...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:50>
(tail call): ?
...s\Bagnon\external\Wildpants\features\autoDisplay.lua:157: in function `ToggleAllBags'
[string "OPENALLBAGS"]:1: in function <[string "OPENALLBAGS"]:1>

Locals:

commented

PlaySound no longer takes strings, only ids, so you have to change to them.

https://www.townlong-yak.com/framexml/ptr/SoundKitConstants.lua

commented

As far as I can tell the 'BAGMENUBUTTONPRESS' (used at line 104 of the bag.lua sound no longer exists in the current sound kit, or if it does it is named something different so I used the Backpack Open sound.

I changed to the following and on the ptr it seems to work fine:

Bagnon\external\Wildpants\components\bag.lua
Line 84:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
Line 104:
PlaySound(117) -- BAGMENUBUTTONPRESS
Line 252:
PlaySound(SOUNDKIT.IG_MAINMENU_OPEN)

Bagnon\external\Wildpants\components\frameBase.lua:
Lines 10 & 11:
Frame.OpenSound = SOUNDKIT.IG_BACKPACK_OPEN
Frame.CloseSound = SOUNDKIT.IG_BACKPACK_CLOSE

Bagnon_Config\common\libs\Sushi-3.0\Classes\ButtonBase.lua
Line 23:
Button.sound = SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON

Bagnon_Config\common\libs\Sushi-3.0\Classes\CheckButton.lua
Line 52-54:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
else
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)

Bagnon_Config\common\libs\Sushi-3.0\Classes\ColorPicker.lua
Line 85:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)

Bagnon_Config\common\libs\Sushi-3.0\Classes\DropdownFrame.lua
Line 124:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)

Bagnon_Config\common\libs\Sushi-3.0\Classes\TextureDropdown.lua
Line 156:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)

Bagnon_GuildBank\components\frame.lua
Line 14&15
Frame.CloseSound = SOUNDKIT.GUILD_VAULT_CLOSE
Frame.OpenSound = SOUNDKIT.GUILD_VAULT_OPEN

Bagnon_GuildBank\components\moneyFrame.lua
Line 38:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION)
Line 48:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION)

Bagnon_VoidStorage\components\dialogs.lua
Line 18:
PlaySound(SOUNDKIT.UI_VOID_STORAGE_UNLOCK)

Bagnon_VoidStorage\components\frame.lua
Line 15&16"
Frame.OpenSound = SOUNDKIT.UI_ETHEREAL_WINDOW_OPEN
Frame.CloseSound = SOUNDKIT.UI_ETHEREAL_WINDOW_CLOSE

commented

Looks like there are multiple instances of PlaySound across 11 files, a good chunk is in the library Sushi-3.0.

commented

Expanding on @Stanzilla :

frameBase.lua line 17

Frame.OpenSound = SOUNDKIT.IG_BACKPACK_OPEN
Frame.CloseSound = SOUNDKIT.IG_BACKPACK_CLOSE

The playsound function doesn't use strings anymore, so the soundkit file carries their number as a part of the structure. (883 and 884 i think).

Been a while since i've coded. Commented on Curse forums aswell, fixed for me.

commented

Yep, the soundkit. would be the better way (did the fast and easy #'s at first), updated my comment above with the more long term SOUNDKIT. piece until @Jaliborc updates the addon.

commented

I would have done a PR, but was pressed for time due to some RL appointments and work. Looks like @theisencr is doing up some of them.

commented

With the "I am not a WoW addon developer" disclaimer... all of the pull requests have been generated for each of the individual projects (including the libs in @Knaledge's comment) based on @Torsin's comment. Updated a few other places in the libs to SOUNDKIT, but I confess I probably wasn't thorough; just simple string searches.

commented

BagnonPatched.zip
Here is a patched version with the changes above applied to the most recent version of Bagnon. Just unzip in WoWHome/Interface/addons

commented

Thank you, @yinzara. That worked perfectly.
I didn't do a code review, though, so I hope it's not logging my keystrokes or something. :)

commented

Also @yinzara TYVM!!! I did check code, didnt' see any major issues, but not enough to make promises!

commented

Thanks @theisencr.. I was about to offer to do it, but realised you're on top of it :)

commented

@theisencr - looking good for the commons/externals. The next PR would be changes to the Bagnon-specific components themselves (i.e. patching Wildpants, patching Sushi-3.0, and then patching Bagnon itself).

Once those PRs on Wildpants/Sushi get approved/merged, the packaged version of Bagnon (here) would be updated to include those new versions of Wildpants/Sushi - and then the changes to Bagnon itself committed and merged into that new "branch". That PR gets submitted, approved, merged, and then made public.

commented

@Knaledge pretty sure all those PRs are already there.

commented

Awesome. BagnonPatched.zip fixed the bag problem for me too.

commented

So far, frameBase.lua was the only thing throwing an error for me. I looked up and used the numbers and it works. I will keep your list handy in case I throw more errors so I can grab them as they happen. Too lazy to dig through them all with all these demons to kill!

commented

I hear ya @auddie2015 , seems like most of the other ones surround the settings sounds and the void storage/guild bank.

commented

@Torsin
BAGMENUBUTTONPRESS exists. That SOUNDKIT table is nowhere near comprehensive, just a list of common UI sounds in the Blizzard code used by Blizzard for easy conversion. The sound ID is 117. Every sound name PlaySound used to accept can be located in Wowhead's sound list.

commented

@Torsin can you submit a PR with your full changes so that @Jaliborc can simply pull it in and release? Would help a lot of people :)

commented

EDIT: Was going to submit pull request(s) to fix but ran out of time before raid, sorry. Hopefully someone can package up a fix for people tonight.

commented

Anyone looking to make the PR: @Torsin @comp615 @theisencr (and for completeness, @Jaliborc) - If a PR is submitted, it may be worth submitting to each individual project, then anyone using those libs may benefit:

It's likely they would be back-ported from this project back upstream to those commons, though doing that directly would probably make life a bit easier.

commented

When trying to open the guild bank you will also get an error.

commented

Just realized the zip file done by @yinzara used my comment with the numbers instead of the soundkit.values, also changed to use 117 for the dragging sound then packaged it up:
Bagnon_73_Ready.zip

commented

Also you can just use https://mods.curse.com/addons/wow/275697-playsound-temporal-fix until your addons are updated.

commented

Looks like the latest update fixed everything, but the Guild Bank:
Bagnon_GuildBank/components/frame.lua has these values:

Frame.CloseSound = 'GuildVaultClose'
Frame.OpenSound = 'GuildVaultOpen'

Whereas it should be these:

Frame.CloseSound = SOUNDKIT.GUILD_VAULT_CLOSE
Frame.OpenSound = SOUNDKIT.GUILD_VAULT_OPEN

Same with Bagnon_VoidStorage\components\frame.lua:

Frame.OpenSound = 'UI_EtherealWindow_Open'
Frame.CloseSound = 'UI_EtherealWindow_Close'

It should be:

Frame.OpenSound = SOUNDKIT.UI_EtherealWindow_Open
Frame.CloseSound = SOUNDKIT.UI_EtherealWindow_Close