Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# AmbientSound - Prototype Docs

## AmbientSound 'ambient-sound' 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 | :: AmbientSoundType |
planet 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 optional | :: VariableAmbientSoundVariableSound | Variable music track. [...]
Variable music track. [...]

name | :: string | Unique textual identification of the prototype.
Unique textual identification of the prototype.
track_type | :: AmbientSoundType |
type | :: `"ambient-sound"` | Specification of the type of the prototype.
Specification of the type of the prototype.
planet 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 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

### planet :: SpaceLocationID optional

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

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