HazyBass Posted September 6, 2021 Share Posted September 6, 2021 (edited) 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 September 6, 2021 by HazyBass Link to comment Share on other sites More sharing options...
lostdarkwolf Posted September 6, 2021 Share Posted September 6, 2021 (edited) 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 September 6, 2021 by lostdarkwolf Link to comment Share on other sites More sharing options...
HazyBass Posted September 6, 2021 Author Share Posted September 6, 2021 (edited) 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 September 6, 2021 by HazyBass Link to comment Share on other sites More sharing options...
lostdarkwolf Posted September 8, 2021 Share Posted September 8, 2021 (edited) 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 September 8, 2021 by lostdarkwolf Link to comment Share on other sites More sharing options...
HazyBass Posted September 8, 2021 Author Share Posted September 8, 2021 (edited) 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 September 8, 2021 by HazyBass Link to comment Share on other sites More sharing options...
lostdarkwolf Posted September 9, 2021 Share Posted September 9, 2021 (edited) 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 September 9, 2021 by lostdarkwolf Link to comment Share on other sites More sharing options...
Recommended Posts