I don't really want to fiddle with the resources layout as people may have re-done those in different languages. See:
http://www.gammon.com.au/scripts/doc.php?general=plugin_callbacks
There is a callback: OnPluginPlaySound
That lets you handle the sound playing (for example for triggers). Here is an example plugin I made a while back that plays different volume levels and panning depending on the file name:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="Sound_Volume_Reducer"
author="Nick Gammon"
id="b1308ed1e6d5e4facdaf7bdd"
language="Lua"
purpose="Plays trigger sounds more quietly"
date_written="2010-06-02 06:33:40"
requires="4.40"
version="1.0"
>
<description trim="y">
<![CDATA[
Install this to play trigger sounds at reduced volume.
]]>
</description>
</plugin>
<!-- Script -->
<script>
<![CDATA[
volumes = {
["west"] = { volume = -6, pan = -100} ,
["east"] = { volume = -15, pan = 100} ,
}
function OnPluginPlaySound (sound)
-- defaults
local volume = -12
local pan = 0
-- search file name for a keyword that affects its volume
for k, v in pairs (volumes) do
if string.match (sound, k) then
volume = v.volume
pan = v.pan
break
end -- if matched part of sound name
end -- for
PlaySound (0, sound, false, volume, pan) -- play supplied sound as required
end -- function
]]>
</script>
</muclient>
You could do something similar that checks a variable and plays at that sound level. Then make an alias to alter the variable's value. You could make another alias to do a test sound.