File: sound-effects.rst

package info (click to toggle)
openmw 0.49.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,992 kB
  • sloc: cpp: 372,479; xml: 2,149; sh: 1,403; python: 797; makefile: 26
file content (373 lines) | stat: -rw-r--r-- 10,717 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
#############
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. 

Ambient
=======

.. list-table:: 
   :widths: 35 65
   :header-rows: 1

   * - Sound name
     - Situation used
   * - ``ashstorm``
     - During an ash storm
   * - ``blight``
     - During the red blight storm
   * - ``blizzard``
     - During a blizzard
   * - ``rain``
     - During rainy weather
   * - ``rain heavy``
     - During stormy weather
   * - ``thunder0``
     - Played randomly during stormy weather
   * - ``thunder1``
     - Played randomly during stormy weather
   * - ``thunder2``
     - Played randomly during stormy weather
   * - ``thunder3``
     - Played randomly during stormy weather
   * - ``underwater``
     - When the camera is under the water level
   * - ``water layer``
     - When the player is near the water level

.. 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.


Equiping items and weapons
==========================

Sound names in this category follow a pattern.

* Each name contains the type of object this sound applies to.
* Names ending with ``up`` are used when the item type is picked up, equiped, readied, or grabbed in the inventory.
* Names ending with ``down`` are used when the item type is dropped, unequiped, put away, or released in the inventory.

.. list-table:: 
   :widths: 35
   :header-rows: 1

   * - Sound name
   * - ``item ammo up``
   * - ``item ammo down``
   * - ``item apparatus up`` 
   * - ``item apparatus down``
   * - ``item armor heavy up``
   * - ``item armor heavy down``
   * - ``item armor light up``
   * - ``item armor light down``
   * - ``item armor medium up``
   * - ``item armor medium down``
   * - ``item bodypart up``
   * - ``item bodypart down``
   * - ``item book up``
   * - ``item book down``
   * - ``item clothes up``
   * - ``item clothes down``
   * - ``item gold up``
   * - ``item gold down``
   * - ``item ingredient up``
   * - ``item ingredient down``
   * - ``item lockpick up``
   * - ``item lockpick down``
   * - ``item misc up``
   * - ``item misc down``
   * - ``item potion up``
   * - ``item potion down``
   * - ``item probe up``
   * - ``item probe down``
   * - ``item repair up``
   * - ``item repair down``
   * - ``item ring up``
   * - ``item ring down``
   * - ``item weapon blunt up``
   * - ``item weapon blunt down``
   * - ``item weapon bow up``
   * - ``item weapon bow down``
   * - ``item weapon crossbow up``
   * - ``item weapon crossbow down``
   * - ``item weapon longblade up``
   * - ``item weapon longblade down``
   * - ``item weapon shortblade up``
   * - ``item weapon shortblade down``
   * - ``item weapon spear up``
   * - ``item weapon spear down``


Combat
======

.. list-table:: 
   :widths: 35 65
   :header-rows: 1

   * - Sound name
     - Situation used
   * - ``bowpull``
     - Start of a bow attack 
   * - ``bowshoot``
     - A bow is released and fires an arrow
   * - ``critical damage``
     - Critial damage is dealt
   * - ``crossbowpull``
     - Start of a crossbow attack
   * - ``crossbowshoot``
     - A crossbow is released and fires a bolt
   * - ``hand to hand hit``
     - Hitting a valid target with fists
   * - ``hand to hand hit 2``
     - Hitting a valid target with fists
   * - ``heavy armor hit``
     - A character wearing heavy armour is hit   
   * - ``light armor hit``
     - A character wearing light armor is hit
   * - ``medium armor hit``
     - A character wearing medium armor is hit
   * - ``miss``
     - An attack misses
   * - ``weapon swish``
     - Melee weapon attack. The sound is modulated based on attack strength.


UI
==

.. list-table:: 
   :widths: 35 65
   :header-rows: 1

   * - Sound name
     - Situation used
   * - ``book close``
     - A book or journal is closed
   * - ``book open``
     - A book or journal is opened
   * - ``book page``
     - Go to the previous page of a book or journal
   * - ``book page2``
     - Go to the next page of a book or journal
   * - ``menu click``
     - Mouse click on a button
   * - ``scroll``
     - book object of a scroll type is opened or closed


Movement
========

Movement 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.

* When the sound name ends in ``left`` it plays when ``soundgen: left`` occurs.
* When the sound name ends in ``right`` it plays when ``soundgen: right`` occurs.
* Landing requires ``soundgen: land``

.. list-table:: 
   :widths: 25 75
   :header-rows: 1

   * - Sound name
     - Situation used
   * - ``defaultland``
     - When a character lands on the ground
   * - ``defaultlandwater``
     - When a character lands in water
   * - ``footbareleft``
     - While walking, running, or sneaking on land and not wearing armour
   * - ``footbareright``
     - While walking, running, or sneaking on land and not wearing armour
   * - ``footheavyleft``
     - While walking, running, or sneaking on land and wearing heavy armour boots
   * - ``footheavyright``
     - While walking, running, or sneaking on land and wearing heavy armour boots
   * - ``footlightleft``
     - While walking, running, or sneaking on land and wearing light armour boots
   * - ``footlightright``
     - While walking, running, or sneaking on land and wearing light armour boots
   * - ``footmedleft``
     - While walking, running, or sneaking on land and wearing medium armour boots
   * - ``footmedright``
     - While walking, running, or sneaking on land and wearing medium armour boots
   * - ``footwaterleft``
     - While walking, running, or sneaking in shallow water
   * - ``footwaterright``
     - While walking, running, or sneaking in shallow water
   * - ``swim left``
     - When swimming
   * - ``swim right``
     - When swimming


Interactions
============

.. list-table:: 
   :widths: 35 65
   :header-rows: 1

   * - Sound name
     - Situation used
   * - ``disarm trap``
     - A trap is successfully disarmed
   * - ``disarm trap fail``
     - Attempt to disarm a trap is unsuccessful
   * - ``enchant fail``
     - Enchanting or recharging an item fails
   * - ``enchant success``
     - Enchanting or recharging an item is successful
   * - ``lockedchest``
     - Trying to open a locked chest
   * - ``lockeddoor``
     - Trying to open locked doors
   * - ``open lock``
     - Unlock attempt succeeds
   * - ``open lock fail``
     - Unlock attempt fails 
   * - ``potion fail``
     - Brewing a potion fails
   * - ``potion success``
     - Brewing a potion succeeds
   * - ``repair``
     - Repair of an item is successful
   * - ``repair fail``
     - Repair attempt of an item fails
   * - ``spellmake fail``
     - Attempt at creating a new spell fails
   * - ``spellmake success``
     - Creating a new spell is successful

     
Misc
====

.. list-table:: 
   :widths: 35 65
   :header-rows: 1

   * - `Sound` name
     - Situation used 
   * - ``drink``
     - The player consumes a potion
   * - ``drown``
     - Looping while the player is underwater and out of breath
   * - ``health damage``
     - When a character or creature takes damage
   * - ``skillraise``
     - When a skill is raised
   * - ``swallow``
     - The player consumes an ingredient
   * - ``torch out``
     - When the currently equipped torch is extinguished


User-defined Sound Effects
**************************

Lights
======

Objects of `Light` type can be assigned a sound record that will be played repeatedly.


Activators
==========

`Activators` can play a sound effect through their assigned script. This method  
can be used to place unique, localized sound effects in the world.


Doors
=====

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.


Magic effects
=============

Each `Magic Effect` has four slots where sounds are assigned.

* `Casting Sound` - when the spell with this magic effect is cast
* `Hit Sound` - when the spell hits a target
* `Area Sound` - when the spell hits an area target
* `Bolt Sound` - projectile from this magic effect


Regions
=======

A `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 speaking
=============

NPCs can utter a `Sound` in specific in-game situations. These are assigned through `Topic Infos` and occur
depending on the `Topic` in use.


* Alarm
* Attack
* Flee
* Hello
* Hit
* Idle
* Intruder
* Thief


Creatures
=========

`Creatures` get sound effects through `Sound Generator` records. A `Sound Generator` is assigned
a creature it will affect and set a type.

* Land
* Left Foot
* Moan
* Right Foot
* Roar
* Scream
* Swim Left
* Swim Right

Each type relates to a specific in-game event or an event defined in the creature's animation textkey file.