Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Ulec on February 17, 2012, 10:17:05 pm

Title: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 17, 2012, 10:17:05 pm
1) Pretty self-explanatory. All I want is to be able to create a spell whose sole function is to play a soundfile uncut regardless of any interruptions and whatnot.

What I've done so far was to edit the SpellVisual.dbc, SoundEtnries.dbc and Spell.dbc to make this happen. However upon launching WoW it gave me an error which indicated that SoundEntries.dbc lacked a column (was 29 columns there, however the game expected there to be a total of 30 columns).

I have spotted which column corresponds to the spell visual (already knew) in the Spell.dbc, changed it to the ID of the spell visual that I have created. And I've figured out which column sets the sound effect for the spell visual and changed it to the Id of the entry that I've created in SoundEntries.dbc.

The spell has no global or normal cooldown, has no attributes and no mechs. It only has an effect, a visual, an icon and a name. The visual is also plain simple. No visual effects - ironically - yet just a sound effect.


2) If this does not work I'll resort to lua and create something resembling an addon to do accomplish what I need. However then I'll need to figure out how to make the said sound get heard by anyone within range.


If anyone could help me with either of those, I'd totally appreciate it.

Best Regards,
Can (Ulec)
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Steff on February 18, 2012, 07:30:05 am
Have a look at point 4

viewtopic.php?f=26&t=98 (http://modcraft.io/viewtopic.php?f=26&t=98" onclick="window.open(this.href);return false;)
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 18, 2012, 09:11:42 am
I don't get how that is relevant to my issue. I extracted data from locale-enUs.MPQ alone. I mean I've done it countless times before, I'm sure that is not the issue.
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 18, 2012, 09:25:57 am
I get it now. The issue was most possible regarding the 7th point there. Will let you know whether it's working or not.
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 18, 2012, 11:44:22 am
I figured out the issue but now I can't get the sound to work.

I'm sure that my SoundEntries.dbc and Spell.dbc entries are alright. However I have no clue regarding the flags or columns of the SpellVisual.dbc other than the columns 12 and 13 (11 and 12 for me while viewing on Taliis or another DBC editor)

I set the value at column 12 to 1 to enable the 'missile sound' and enter the sound entry ID to the 13rd column. However it doesn't paly anything.

I've tested the sound in-game by playing it through a script. The sound file is working fine. I think I'm just having a problem with the SpellVisual.dbc. Would appreciate any help.
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Laniax on February 18, 2012, 12:53:37 pm
If i were in your situation, i'd copy an exisiting spell, which wouldn't need a target and doesn't apply a buff or smth. For example: Blink Visual (http://www.wowhead.com/spell=36937). Then i'd try to replace it's sound with the custom one. And if that is working ingame i'd try to get rid of the visual.

Although i think its also possible to trigger a sound within the core (so without the use of a spell). But that depends on what you want to achieve.
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 18, 2012, 01:15:21 pm
I'm familiar with what each column stands for/does within the spell database file,  at least almost all of them so copying an existing spell or creating a new one from scratch doesn't change anything in my case. The spell works anyways. It's the sound effect which is not getting triggered for some reason.

So the spell's functional, sound file's working. My issue persists and it is regarding the SpellVisual.dbc, nothing else from what I can tell.

Also, I want the character to play the said sound file which should be heard by people within range. The default range for spell sounds is what I wanted for it to have anyways so there is no need to fiddle with other stuff to change that. But it must be local.

Also it has to be something 'pressable', you know. Something that I can lay onto my action bars without the need to create a macro for it prior to using it. So there should be no additional effort put into it. Once I manage to get this working it'll be done.
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Eatos on February 19, 2012, 03:45:37 am
well you can code spell to play a sound :)
Regardless of the core you are using you can make a empty dummy or scripteffect spells that all what will do is trigger sound
like
case spellid:
   p_caster->PlaySoundToSet(soundid);
  break;
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 21, 2012, 11:40:58 am
So I will have to script it? I don't have the slightest clue about where to place that though. I take it that there won't be any database work regarding this then?
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 21, 2012, 09:22:54 pm
I've managed to get it work yesterday but it's a tad glitchy when the spell sounds are used. Could you elaborate further on that script?
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Eatos on February 21, 2012, 11:50:35 pm
If my first idea didnt help you you could edit effects of spell you have made.Set effect1 to 132
and effect value number of sound id you want to trigger
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 23, 2012, 05:40:31 pm
Quote from: "Eatos"
If my first idea didnt help you you could edit effects of spell you have made.Set effect1 to 132
and effect value number of sound id you want to trigger

That cuts lots of extra database for me yet it doesn't seem to be working for me.

You're talking about columns 72 and 73 in Spell.dbc, right? I've assigned the value of 132 to the 72nd column, and the SoundEffectID to the 73rd. Yet it doesn't seem to be working. Any idea why?
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Eatos on February 24, 2012, 03:29:56 pm
Quote from: "Ulec"
Quote from: "Eatos"
If my first idea didnt help you you could edit effects of spell you have made.Set effect1 to 132
and effect value number of sound id you want to trigger

That cuts lots of extra database for me yet it doesn't seem to be working for me.

You're talking about columns 72 and 73 in Spell.dbc, right? I've assigned the value of 132 to the 72nd column, and the SoundEffectID to the 73rd. Yet it doesn't seem to be working. Any idea why?


No...Wrong Fields are you using.
Ok in Tallis
Column 71- set to 132 (Apply Aura Play Music)
and Column 110 - set it to your soundid ( Effect1 Field )

And there you go :)
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 24, 2012, 06:30:58 pm
Quote from: "Eatos"
Quote from: "Ulec"
Quote from: "Eatos"
If my first idea didnt help you you could edit effects of spell you have made.Set effect1 to 132
and effect value number of sound id you want to trigger

That cuts lots of extra database for me yet it doesn't seem to be working for me.

You're talking about columns 72 and 73 in Spell.dbc, right? I've assigned the value of 132 to the 72nd column, and the SoundEffectID to the 73rd. Yet it doesn't seem to be working. Any idea why?


No...Wrong Fields are you using.
Ok in Tallis
Column 71- set to 132 (Apply Aura Play Music)
and Column 110 - set it to your soundid ( Effect1 Field )

And there you go :)

Ah, alright. Appreciate it. Going to try it now. That should cut down on my database work heavily.
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 24, 2012, 07:38:26 pm
It is not working that way I'm afraid. It does nothing :/

Even none of the original spells within the .dbc with the effect '132' are not doing anything. Perhaps it has to do with my core/emu?
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Eatos on February 25, 2012, 01:28:19 am
Here it is video :)
http://youtu.be/fkdA73gvAck
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 26, 2012, 09:31:21 pm
Is there any way to make that effect play the sound file as a sound effect rather than music? I do not want it to cut the area music. Also many people have music muted by default, so I'd rather have these as sound effects.

Any idea?
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Eatos on February 27, 2012, 09:58:25 pm
If you set sound type to 1 :) should work probably
Title: Re: [QUESTION] How to make a spell play a sound (Only function)
Post by: Ulec on February 28, 2012, 10:26:15 pm
Quote from: "Eatos"
If you set sound type to 1 :) should work probably

Thanks :) Will try it now.