0 of 0

File information

Last updated

Original upload

Created by


Uploaded by


Virus scan

Safe to use

Tags for this mod

About this mod

try and fix bad-behaved MWSE-Lua sound replacer mods and playSound function

Permissions and credits
Some MWSE mods (e.g. Impact Sounds, Character Sound Overhaul...) replace/completely block vanilla creatures/NPCs standard sounds breaking vanilla scripts relying on GetSoundPlaying to detect those sounds.
This mod tries to fix this incompatibility lowering the original sound volume instead of blocking the sound.

Version 1.04 (and later) should generally fix MWSE-Lua playSound function breaking vanilla scripting SayDone function when playing sound files instead of sound objects (basically fixing e.g. Almalexia speech overlapping before battle when using MWSE-Lua sound replacers mods)

MWSE-Lua added a (requested by sound replacement mod authors) possibility to use the PlaySound function
to not only play standard game sound objects but also directly sound files (e.g. Sound\4NM\Ammo0\wpn_throwing_draw_01.wav) like the vanilla Say command.

This has the advantage o requiring less memory to play hundreds of new sound files.
Problem is currently this patch to PlaySound causes it to trigger the SayDone vanilla function any time the PlaySound command is called to directly play one of these physical sound files, such breaking standard scripts relying on standard SayDone function behavior (e.g. daedric shrines statue speeches).

While a real PlaySound fix for this is not yet available (it would involve patching the game executable in several different places, something very time consuming and so difficult that probably only MWSE-Lua authors can do it), this mod has an option to try and fix this by temporarily blocking the non-speech sounds replacement done by bad-behaved MWSE-Lua sound replacer mods.

This mod is trying to do this fix in a couple different ways:

1. (with the "Fix speech activators SayDone" option enabled)
When player activates an activator object having a local script attached using the SayDone + Activate + Journal vanilla commands (e.g. Azura shrine statue) it blocks the player from acting/moving while the speech is going.

This way no player sounds are emitted, and no MWSE-Lua sound replacer mod can break the vanilla scripts saydone checks making the speech parts overlap (alternative would be to keep player acting, but that would mean you have to block any replacer sound instead and that would... not sound well for a long time speech).

2. (with the "Fix generic SayDone" option enabled)
When there is no generic detectable activator used to start the speeches (e.g. Almalexia speeches before battle), this mod tries to detect speeches and allow only them to play while blocking the other kind of player sound replacements until the speech is done.

Also sound replacer mods are often not well-behaved and completely block a vanilla sound when they replace it, possibly breaking vanilla mods trying to detect that vanilla sound and conflicting with other MWSE-Lua mod trying to do the same thing.

This mod tries to fix this problem (with the "Unblock vanilla sounds" option enabled) by unblocking these vanilla sounds and lowering their sound volume instead so they are still detectable by vanilla functions/other mods.

My original intention was to keep the mod simple and not bloat the MCM control panel, but as it proved to be impossible to guarantee these changes will not conflict with other possible mods, these options are now toggleable, so you can decide to enable/disable them as preferred (e.g. enable right before using that shrine/approaching that cutscene, disable after) from the mod MCM panel.