docs/source/reference/modding/sound-effects.rst
############# Sound Effects #############
Every game needs sound effects to create the best possible player experience. Audio files are played during a variety of in-game situations and this is how they are set up in OpenMW. Some are user-definable, while a lot of them are hardcoded to specific names.
Supported Formats
OpenMW uses FFmpeg <https://ffmpeg.org/>_ and thus supports many formats.
For sound effects we suggest using 16-bit .wav files.
Sound File, Sound, Sound Gen
Sound File record in OpenMW-CS is the audio file on the disk. When files are placed in data/sound and its subfolders, OpenMW-CS will list them in a table. Sound File records aren't used directly in OpenMW-CS but must first be assigned to a Sound record.Sound is the record that can be assigned to other records in OpenMW-CS. It needs a Sound File assigned, has volume, min range, and max range properties.Sound Generator record is used for creature animation events (groan, get hit, die, footsteps). It takes the Sound record and defines what creature uses this effect and when... note:: Newly created Sound records in OpenMW-CS have their Max Range value set to 255.
This can cause the sound to not be audible in-game. To fix this, set the mentioned value to 0.
Hardcoded Effects
The following sound effects are hardcoded. They require a properly named Sound record and will then be used in their relevant in-game situations.
.. list-table:: :widths: 35 65 :header-rows: 1
ashstormblightblizzardrainrain heavythunder0thunder1thunder2thunder3underwaterwater layer.. note:: Names for these sounds can be changed in openmw.cfg but we strongly suggest they stay the same.
Another issue is with ashstorm, blight, blizzard which have missing or erroneous fallback lines,
unless they were imported from Morrowind.
These will be fixed with the planned dehardcoding of weather types and using Lua.
Sound names in this category follow a pattern.
up are used when the item type is picked up, equiped, readied, or grabbed in the inventory.down are used when the item type is dropped, unequiped, put away, or released in the inventory... list-table:: :widths: 35 :header-rows: 1
item ammo upitem ammo downitem apparatus upitem apparatus downitem armor heavy upitem armor heavy downitem armor light upitem armor light downitem armor medium upitem armor medium downitem bodypart upitem bodypart downitem book upitem book downitem clothes upitem clothes downitem gold upitem gold downitem ingredient upitem ingredient downitem lockpick upitem lockpick downitem misc upitem misc downitem potion upitem potion downitem probe upitem probe downitem repair upitem repair downitem ring upitem ring downitem weapon blunt upitem weapon blunt downitem weapon bow upitem weapon bow downitem weapon crossbow upitem weapon crossbow downitem weapon longblade upitem weapon longblade downitem weapon shortblade upitem weapon shortblade downitem weapon spear upitem weapon spear down.. list-table:: :widths: 35 65 :header-rows: 1
bowpullbowshootcritical damagecrossbowpullcrossbowshoothand to hand hithand to hand hit 2heavy armor hitlight armor hitmedium armor hitmissweapon swish.. list-table:: :widths: 35 65 :header-rows: 1
book closebook openbook pagebook page2menu clickscrollMovement sounds apply to the player and NPCs, together reffered to as characters. Each sound is played in a specific in-game situation and requires a textkey.
left it plays when soundgen: left occurs.right it plays when soundgen: right occurs.soundgen: land.. list-table:: :widths: 25 75 :header-rows: 1
defaultlanddefaultlandwaterfootbareleftfootbarerightfootheavyleftfootheavyrightfootlightleftfootlightrightfootmedleftfootmedrightfootwaterleftfootwaterrightswim leftswim right.. list-table:: :widths: 35 65 :header-rows: 1
disarm trapdisarm trap failenchant failenchant successlockedchestlockeddooropen lockopen lock failpotion failpotion successrepairrepair failspellmake failspellmake success.. list-table:: :widths: 35 65 :header-rows: 1
Sound namedrinkdrownhealth damageskillraiseswallowtorch outUser-defined Sound Effects
Objects of Light type can be assigned a sound record that will be played repeatedly.
Activators can play a sound effect through their assigned script. This method
can be used to place unique, localized sound effects in the world.
Objects of Door type can be assigned two sounds. One is played when the door
is used or opened. The other is played when the door is closed. Locked door
sound is hardcoded and listed in a prior table.
Each Magic Effect has four slots where sounds are assigned.
Casting Sound - when the spell with this magic effect is castHit Sound - when the spell hits a targetArea Sound - when the spell hits an area targetBolt Sound - projectile from this magic effectA Region has a Sounds table where it can be assigned any number of sounds.
These are played while the player is in this region and are given a chance how
often they will be heard.
NPCs can utter a Sound in specific in-game situations. These are assigned through Topic Infos and occur
depending on the Topic in use.
Creatures get sound effects through Sound Generator records. A Sound Generator is assigned
a creature it will affect and set a type.
Each type relates to a specific in-game event or an event defined in the creature's animation textkey file.