Oblivion

File information

Last updated

Original upload

Created by

scanti

Uploaded by

scanti

Virus scan

Safe to use

About this mod

This is an OBSE plugin, modders resource that allows you to alter the various volume levels from a script.

Permissions and credits
OBSE plug-in SoundCommands v4.0



What is it?

The aim of this plug-in is to add various commands that allow you to control the sound system in Oblivion. This is a modders resource and you are free to include this plug-in with your code. You need OBSE for this plug-in to work. You can download OBSE from:

http://obse.silverlock.org/

This plug-in only supports Oblivion version 1.2.0.416. If you use it with an earlier version it won't cause any errors, the commands will just get ignored.


How do I use it?

The new commands are as follows:

SetMasterVolume <volume><br><br>Sets the global master volume. This setting effects all the volumes.<br><br>SetMusicVolume <volume> <optional volume><br><br>This sets the volume of the background music in the game.<br><br>The volume mode parameter allows you to alter the behavior of the volume command. It has 3 settings:<br><br>0 - <span class="wbbtab"></span>Immediately change the music's volume but when the track changes go back to the original volume before the command was issued.<br><br>1 - <span class="wbbtab"></span>Immediately change the music volume and make it stick.(This is a combination of settings 0 and 2). This is the default setting.<br><br>2 - <span class="wbbtab"></span>Change the music volume when the current track ends and a new one plays.<br><br>SetEffectsVolume <volume><br><br>Sets the effects volume.<br><br>SetFootVolume <volume><br><br>Set the volume of your footsteps.<br><br>SetVoiceVolume <volume><br><br>Sets how loudly people talk.<br><br>FadeMusic <start volume> <end volume> <duration in seconds><br><br>NB: This command is experimental. Please let me know if it causes any problems.<br><br>This fades the music volume from the starting volume to the end volume, taking the specified amount of time to complete. While the music is fading the SetMusicVolume command won't do anything.<br><br><float> GetMusicVolume <optional volume type><br><br>This command returns the current volume of the music. As there are several ways of setting the music volume there are several ways of reading it. It will return -1 if you are using an unsupported version of oblivion (except for volume type 0) or if the FadeMusic command is currently fading the music (as the volume will be constantly changing).<br><br>The volume type parameter has 3 settings:<br><br>0 - <span class="wbbtab"></span>This returns the value stored in the fDefaultMusicVolume Oblivion.INI setting. This is the volume the player wants their music to play at.<br><br>1 - <span class="wbbtab"></span>This returns the volume level that is currently stored by the sound system. It may not actually be the current music volume. It's changed by SetMusicVolume methods 1 and 2. (This is the default setting).<br><br>2 - <span class="wbbtab"></span>This is the music volume of the track currently being played. The volume may change once the track finishes and a new one plays. This is changed by SetMusicVolume methods 0 and 1.<br><br>PlayMusicFile <music filename><br><br>This command will immediately play the music file pointed to by the filename. If the filename contains a wildcard character the command will load a random music file matching the wildcarded filename. i.e. PlayMusicFile "data\music\mymusic\*.mp3" will play a random mp3 file in the data\music\mymusic folder.<br><br>The music will get overidden according to the rules that the Oblivion engine uses. i.e. if you change a cell and the music type for that cell is different from the type that's playing or if you enter or exit combat.<br><br><volume of effects> GetEffectsVolume <optional or><br><volume of footsteps> GetFootVolume <optional or><br><volume of voices> GetVoiceVolume <optional or><br><master volume> GetMasterVolume <optional or><br><br>These commands allow you to find out the volume that different categories of sounds are playing at. It has one optional parameter.<br><br>If it is set to 0 then the command will get the INI setting for that volume type. This will be the volume that the user wishes the volume to be at.<br><br>If it set to 1 (which is the default value) it will get the current volume level for that volume type.<br><br><br>The volume parameter for all the commands is in the range of 0 (for silent) to 1 (for full volume). If you try to set the volume outside this range, the volume will get clamped to within the range. The volume setting seems to be logarithmic and not linear.<br><br>Usage requirements.<br><br>You can do whatever you like with this plug-in. Just include it in with your mod if you do use the command.<br><br>Change log.<br><br>v 4.0<br><br>Added GetEffectsVolume, GetFootVolume, GetVoiceVolume, GetMasterVolume commands.<br><br>v 3.0<br><br>Added PlayMusicFile command.<br><br>v 2.0<br><br>Added new GetMusicVolume command.<br><br>Patched the oblivion exe so that it doesn't write back any volume settings changed within a script to your Oblivion.ini file. Settings changed in the audio menu will still update the INI file.<br><br>Added some housekeeping to the FadeMusic command for when you quit the game.<br><br>The source code now uses structures instead of complicated pointers to pointers to pointers.<br><br>v 1.0<br><br>First release.<br><br></optional></master></optional></volume></optional></volume></optional></volume></music></optional></float></duration></end></start></volume></volume></volume></optional></volume></volume>