Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## AmbientSound 'ambient-sound' changed Example code

This prototype is used to make sound while playing the game. This includes the game's music, composed by Daniel James Taylor.

## Properties

- default
- sorted

type | :: `"ambient-sound"` | Specification of the type of the prototype.
Specification of the type of the prototype.
name | :: string | Unique textual identification of the prototype.
Unique textual identification of the prototype.
weight optional | :: double | Cannot be less than zero. [...]
Cannot be less than zero. [...]
track_type changed | :: AmbientSoundType |
planet new optional | :: SpaceLocationID | Track without a planet is bound to space platforms.
Track without a planet is bound to space platforms.
sound optional | :: Sound | Static music track. [...]
Static music track. [...]
variable_sound new optional | :: VariableAmbientSoundVariableSound | Variable music track. [...]
Variable music track. [...]

name | :: string | Unique textual identification of the prototype.
Unique textual identification of the prototype.
track_type changed | :: AmbientSoundType |
type | :: `"ambient-sound"` | Specification of the type of the prototype.
Specification of the type of the prototype.
planet new optional | :: SpaceLocationID | Track without a planet is bound to space platforms.
Track without a planet is bound to space platforms.
sound optional | :: Sound | Static music track. [...]
Static music track. [...]
variable_sound new optional | :: VariableAmbientSoundVariableSound | Variable music track. [...]
Variable music track. [...]
weight optional | :: double | Cannot be less than zero. [...]
Cannot be less than zero. [...]

## Properties

### type :: `"ambient-sound"`

Specification of the type of the prototype.

### name :: string

Unique textual identification of the prototype.

### weight :: double optional

Default: `1`

Cannot be less than zero.

Cannot be defined if `track_type` is `"hero-track"`.

### track_type :: AmbientSoundType changed

### planet :: SpaceLocationID optional new

Track without a planet is bound to space platforms.

### sound :: Sound optional

Static music track.

One of `sound` or `variable_sound` must be defined. Both cannot be defined together.

### variable_sound :: VariableAmbientSoundVariableSound optional new

Variable music track.

One of `sound` or `variable_sound` must be defined. Both cannot be defined together.

## Example

    {
      type = "ambient-sound",
      name = "world-ambience-4",
      track_type = "interlude",
      sound =
      {
        filename = "__base__/sound/ambient/world-ambience-4.ogg",
        volume = 1.2
      }
    }