HELP: An eccho issue with a sound addon
Hi,
Recently, i downloaded for my monk an addon called "hokuto no monk". It's a simple addon with no interface that adds sounds for certain "spells". For example, when using "fists of fury", it will trigger a Bruce Lee-like "aaaaatatatatata" kind of sound, among others. I wasn't satisfied with the overall sound quality or the few amount of sounds (5 or 6 total), so i decided to download and use my own. I modified the LUA file accordingly in order to add all my new sound files (16 total directly ripped from the PS2 Hokuto no Ken game). Everything is working well, except for the aforementioned "aaaaaatatatata" sound associated with "fists of fury". That particular sound file for that particular spell is ALWAYS ecchoed, whatever the sound file i choose to associate with "fists of fury". It does that only for that spell, and not for any other. It was also doing that with the original sound file chosen by the mod's author. When i checked the LUA file, there was no difference that i could tell between say... the "fists of fury" line, and the "paralysis" or "touch of death" lines... They're exactly the same, except for the spell name. So my question is: why is there an eccho with the sound file associated with "fists of fury"? And also, how to remove it? I literally looked over the internet for 2 days now, i completely uninstalled and reinstalled all my addons, deleted the WTF and cache folders, tried to tweak the LUA file again and again.... and it just doesn't seem to fix the problem. Any help would be REALLY appreciated! Below, you'll find a copy of the LUA file (it's quite short): (the forum won't let me copy paste it exactly the way it is, but any person familiar with LUA files will understand i guess) local frame = CreateFrame("FRAME", "okutonomonk"); frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED"); local function eventHandler(self, event, ...) if event=="COMBAT_LOG_EVENT_UNFILTERED" then local timestamp, type, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlags2, destGUID, destName, destFlags, destFlags2 = select(1, ...) local player = UnitGUID("player") if type=="SPELL_CAST_SUCCESS" then local spellId, spellName, spellSchool = select(12, ...)); local spellLink = GetSpellLink(spellId) if spellName=="Fists of Fury" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Fists of Fury.ogg", "SFX") end if spellName=="Blackout Kick" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Blackout Kick.ogg", "SFX") end if spellName=="Expel Harm" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Expel Harm.ogg", "SFX") end if spellName=="Flying Serpent Kick" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Flying Serpent Kick.ogg", "SFX") end if spellName=="Grapple Weapon" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Grapple Weapon.ogg", "SFX") end if spellName=="Resuscitate" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Resuscitate.ogg", "SFX") end if spellName=="Rising Sun Kick" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Rising Sun Kick.ogg", "SFX") end if spellName=="Spear Hand Strike" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Spear Hand Strike.ogg", "SFX") end if spellName=="Spinning Crane Kick" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Spinning Crane Kick.ogg", "SFX") end if spellName=="Tiger Palm" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Tiger Palm.ogg", "SFX") end if spellName=="Touch of Karma" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Touch of Karma.ogg", "SFX") end if spellName=="Zen Meditation" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Zen Meditation.ogg", "SFX") end if spellName=="Paralysis" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Paralysis.ogg", "SFX") end if spellName=="Fortifying Brew" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Fortifying Brew.ogg", "SFX") end if spellName=="Touch of Death" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Touch of Death.ogg", "SFX") end if spellName=="Tigereye Brew" and sourceGUID==player then PlaySoundFile("Interface\\AddOns\\HokutoNoMonk\\sounds\\Tigereye Brew.ogg", "SFX") end end end end frame:SetScript("OnEvent", eventHandler); |
Fists of Fury is firing multiple SPELL_CAST_SUCCESS events while it channels, and you're playing the sound effect each time.
You also don't really need the combat log for this, there are UNIT_SPELLCAST events that fire for the player that might be more reliable. |
Wow, thanks for the answer, that was fast!
It makes sense, i understand. However, i have no idea how to fix this in the LUA file. Would you be so kind as to rewrite for me the lines that need to be fixed in order to remove the eccho, please? |
You could try something like this..
Lua Code:
It's drycoded so let me know if it doesn't work. |
I have close to 0 knowledge when it comes to LUA coding. However, if i understand, the only thing that needs to be changed is "if type=="SPELL_CAST_SUCCESS" then..." Am i correct?
What should i write instead? |
Ok, i will put that in the LUA file, but where do i put the lines for sound files associated with spells?
Oh, nevermind, i think i get it... Let me try it. |
That should be the entire script, assuming every sound file just has the same name as the spell it's associated with.
|
I pasted it exactly as you wrote it, and it doesn't work. No sound is playing.
Did i do anything wrong? Yes, every sound file has the exact same name as the skill it is associated with. |
I changed it slightly after I wrote it so you might have to recopy it, if it still doesn't work try putting "print(event, spellName)" above PlaySoundFile and see if it's even getting to that point.
|
Ok, copying and trying now.
Question: when i copy your code, every line is shifted 4 columns to the right. Does it matter? |
Also make sure you restart the client or it might not load the sounds.
|
I restart the client everytime, yes.
I got no result with the code, and when i put " Print(event, spellName) ", i get a LUA error message in game. However, since i'm really ignorant with coding, i'm not sure i did things right. I typed like this: or (event == 'UNIT_SPELLCAST_SUCCEEDED' and Instants[spellName]) then Print(event, spellName) PlaySoundFile Print(even, spellName) and PlaySoundFile lines both start below "then" fom the line above. |
Lowercase P, it's just "print".
|
Ok, trying now.
Ok, so now i got no LUA error anymore and in my chat window, i got messages saying: UNIT_SPELLCAST_SUCCEEDED "spell name" I got no sound playing. |
Well there are pretty much two possibilities: either your sound is off for that channel (sound effects) or the path to the sound files is wrong.
|
The path is correct:
D:\PC Games\MMORPG\World of Warcraft\Interface\AddOns\Hokutonomonk\sounds The spell names are correct, i checked and double checked them. However, i don't get what you mean by "your sound is off for that channel (sound effects)". Are you talking about settings i should change in the options? |
I mean in the sound options under the system menu in-game, make sure Sound Effects is checked and the volume is up since that's the channel "SFX" is telling it to play on.
I might have typed the path wrong to the files but I thought I wrote what you had. Try replacing the PlaySoundFile I have with one of yours like Lua Code:
to see if it'll play that, if it does then there must be some problem with how I've written the path. |
Nice, it works with the spell name i typed. I checked directly with "Fists of Fury", and there is no eccho.
How can i do now to have all 16 sounds working? |
Try this?
Lua Code:
It should be literally the same thing I wrote earlier but maybe there's some quirk to it. |
You sir, are a genius! It works perfectly.
However, i've got one last question: it doesn't trigger the sound file for one spell only: "Flying Serpent Kick". I think it comes from the game that doesn't recognize the spell when typed like this, even though it is the complete name with the right spelling. Would you happen to know how to fix that as well? |
All times are GMT -6. The time now is 12:47 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI