Sound

Sounds can be played by the mud client and sounds are used for weather, music, inside rooms and for object's (eg a dog barking). All sounds are referenced from a list of sound files in sounds in the config file. Sounds should be mono and either mp3 or wav files.

Object Sounds
Objects such a dog doing a fart can be initiated by an action from the mud. For example {odog,afart}. Another way to make an object play a sound is to set the object 'sound' attribute with the sound you want to play. The sound from an object will be in stereo based upon the position of the object relative to the camera.

Refer to the sound effects article about making sounds effects for objects.

Sounds in parentmaps
A position element in parentmaps has a 'sound' attribute that can be assigned a sound. This means sounds can be positioned in the mud. For example to 'surf' sounds play at position 258.43,275.56 and 253.04,275.47 respectively. Thus when a player walks near these positions the player will hear surf:

<POSITION sound="surf" x="258.43" y="275.56" heightcalculation="withprimary"/>
<POSITION sound="surf" x="253.04" y="275.47" heightcalculation="withprimary"/>

Weather
The mud client can play sounds based upon the weather. For example if its raining you can hear rain. The sounds used for wind and rain are specified in the wind and rain elements in environment.

Room
A sound in a room such as a crowd in a restaurant can be specified in the rooms 3d tag. For example:

{rpx300.0y200.0,scrowd}

would specify that a 'crowd' sound.

The same thing can be achieved using a position element to play a sound at a particular place in the room.

Music
Sound can also be played as music. A set of songs can be specified in sounds and these can be referenced in musics which will play the songs at various times. Refer to music for more information.