Jump to content

Ambience sounds howto


llunak

Recommended Posts

X:CE version 0.32 and up can play ambience sounds during ground combat. However, it doesn't actually ship any sounds. This is an explanation on how to add such sounds.

See the relevant part of assets/sounds_gc.xml for details on how to enable ambience sounds. Here is an example mod adding ambience sounds for the forest tileset. Its sounds_gc.xml is as follows:

<?xml version="1.0"?><Sounds> <General>   <Sound name="Ambience Sounds - forest - ambienceforestmod" volume="0.7" repeattime="10-20" group="2" comment="Ambience sounds played periodically during the GC missions" MODMERGEATTRIBUTE="name">     <Wave>birds1.ogg</Wave>     <Wave>birds3.ogg</Wave>     <Wave>birds5.ogg</Wave>     <Wave>woodpecker1.ogg</Wave>   </Sound>   <Sound name="Ambience Sounds Night - forest - ambienceforestmod" volume="0.7" repeattime="20-40" group="2" comment="Ambience sounds played periodically during the GC night missions" MODMERGEATTRIBUTE="name">     <Wave>wolf1.ogg</Wave>     <Wave>wolf3.ogg</Wave>     <Wave>owl1.ogg</Wave>   </Sound>   <Sound name="Ambience Sounds Dawn/Dusk - forest - ambienceforestmod" volume="0.7" repeattime="15-30" group="2" comment="Ambience sounds played periodically during the GC dawn/dusk missions" MODMERGEATTRIBUTE="name">     <Wave>birds1.ogg</Wave>     <Wave>birds3.ogg</Wave>     <Wave>birds5.ogg</Wave>     <Wave>wolf1.ogg</Wave>     <Wave>wolf3.ogg</Wave>   </Sound> </General></Sounds>

Each group of sounds is added by a <Sound> element, with following attributes:

  • name, in the form "Ambience Sounds <time of day> - <tileset name> <any identifier>". A group will be activated if its time of day and tileset match, identifier is primarily to make each group unique. In the example, "Ambience Sounds Night - forest - ambienceforestmod" will be played during night forest missions.
  • volume, the relative volume of the group (0.0-1.0); it is not possible to specify volume per sound file, in that case it will be necessary to adjust the sound files.
  • repeattime, specifying how often a sound from the group should be played, in the form "<min-max>". In the example, one of the night sounds will be played each 20 to 40 seconds.
  • note that for mod merging purposes, it is necessary use MODMERGEATTRIBUTE="name" to say that each element is made unique by its attribute name

Each sound group can contain one or more sound files, specified using <Wave> elements. Whenever a sound is to be played, one of the sound files is chosen at random. Each sound file is specified using its filename (possibly including path, relative to the assets directory).

Each <Sound> group is independent from each other. If there are two or more sound groups active, they will both keep their own repeat timers, and may be even played at the same time.


If somebody created good mod with ambience sounds, I'd be willing to ship it with X:CE (on Steam) enabled by default. The requirements for inclusion would be, roughly:

  • Decent quality. This means that both the sounds should be of good quality (low noise, etc.) and that the usage of the sounds should be good. For example, there should be no distinctive loud sounds repeating every 5 seconds, as that would quickly get annoying. Ambience sounds should add to the atmosphere primary as a background noise, so generally they should be quiet rather than loud and not play too often. Is is ok if some sounds are very noticeable, but they should be played rarely (i.e. separate sound group with a long repeat time).
  • Legal status. There are sites such as http://freesound.org that provide sound samples with various licenses, many of which allow usage in such a mod (e.g. the Creative Commons Attribution Noncommercial license should be ok). The example mod links to all source pages for used samples in its README file.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...