Jump to content

Spell Failure Sounds


HazyBass

Recommended Posts

Hello all,

 

I've been examining spell sounds in the Construction Set, and I don't understand what record determines which "fail" sound plays for which magic effect. Though each school of magic has a "Spell Failure" record in the Sound panel, the Magic Effects menu only mentions cast, bolt, hit and area.

 

I'm looking into this because I'm trying to restore some unused spell sounds, which of course includes spell failure sounds… Any ideas?

 

EDIT: I only just found out about the modders subforum. Feel free to move this thread over there.

Edited by HazyBass
Link to comment
Share on other sites

The sounds start with the ID "Spell Failure Restoration". It's about 75% of the way down the sounds list.

 

Place the new sounds in the right folder, and they should be replaced. For restoration it should be "Data Files/fx/magic/restFAIL.wav". I dont think you need an ESP file.

Edited by lostdarkwolf
Link to comment
Share on other sites

Thank you for your reply.

 

As I said, I know how to find the Spell Failure sounds in the CS.

Let me take an example: when the Shield spell is completed, it triggers "shield.wav", but when failed to be completed, the generic alteration fail sound ("altrFAILwav") plays instead of "shieldFAIL.wav".

I'm trying to find a way – or hoping there is one – to re-enable these unused sounds in order to get more variety (a lot of sounds in the "magic" folder are actually unused like this).

Edited by HazyBass
Link to comment
Share on other sites

When it comes to spells made from spell-making, you are stuck with the default sound-effect system, but you can still replace the sounds.

If you are using OpenMW, GetSoundPlaying will not work right now. Bug report: https://gitlab.com/OpenMW/openmw/-/issues/5272 . It could be best to wait until this gets fixed. I did test this with OpenMW 0.47, and it indeed doesn't work for spell failure sounds.

If GetSoundPlaying is working, you will need to use many calls of GetSpellReadied to play a new sound for each chosen spell. GetSpellReadied should likly be placed within a new start script. Normal spell failure sounds will need to be replaced with silence.

Setting VARIABLE_1:
use many GetSpellReadied "SPELL_ID_NAME" to track if the player is using a spell that has a custom sound effect. Store the sound index within VARIABLE_1. (no sound == value 0, sound effect 1 == value 1, sound effect 2 == value 2, and so on.)

1. check for a spell-casting attempt: (you likely need to call all of them)
GetSoundPlaying, "restoration cast" == 1 )
GetSoundPlaying, "shock cast" == 1 )
GetSoundPlaying, "mysticism cast" == 1 )
GetSoundPlaying, "illusion cast" == 1 )
GetSoundPlaying, "frost cast" == 1 )
GetSoundPlaying, "destruction cast" == 1 )
GetSoundPlaying, "conjuration cast" == 1 )
GetSoundPlaying, "alteration cast" == 1 )

2. wait for the cast using " if ( LastTime<GetCurrentTime ) ", and a timer variable.

3. check VARIABLE_1, and play the appropriate sound. Reset VARIABLE_1.
if VARIABLE_1 was zero, then just go with the default casting sound effect system. In this case, it will still be up to the mod to play a set of non-silent effects for the default sound effect system.

I can try to make an example for you, but I can't promise it will work. OpenMW is all I can use right now, so I wouldn't be able to test it. I will try to get vanilla Morrowind working to learn more about what to do.

Edited by lostdarkwolf
Link to comment
Share on other sites

This is amazing, many thanks to you.

 

I'll probably back-burner this for now, because although TES scripting seems pretty straightforward I haven't tried it myself yet, plus as you said OpenMW compatibility may not currently be ideal. I will definitely come back to it for other mods down the line, though!

Edited by HazyBass
Link to comment
Share on other sites

Oops, I messed up. Just figured out that GetSpellReadied does not support arguments. I was thinking that it would work like GetSpell. It doesn't. What I said above won't work. This means that only vanilla spells on self can have custom sound effects. OpenMW's support for lua mods might be the way to go for this.

Edited by lostdarkwolf
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...