Factorio Prototype DocsVersion 2.1.8

AmbientSound - Prototype Docs

AmbientSound 'ambient-sound' changedExample code

This prototype is used to make sound while playing the game. This includes the base game's music, composed by Daniel James Taylor and the Space Age's music, composed by Petr Wajsar.

Properties

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.

titlenew optional :: string

Alternative name of the track. [...]

Alternative name of the track. [...]

weight optional :: double

Cannot be less than zero. [...]

Cannot be less than zero. [...]

track_type :: AmbientSoundType
planetsnew optional :: array[SpaceLocationID]

The track can play only on specified planets. [...]

The track can play only on specified planets. [...]

surface_namesnew optional :: array[string]

The track can play only on surfaces with specified names. [...]

The track can play only on surfaces with specified names. [...]

play_on_all_surfacesnew optional :: boolean

The track can play everywhere. [...]

The track can play everywhere. [...]

exclude_planetsnew optional :: array[SpaceLocationID]

The track cannot play on specified planets. [...]

The track cannot play on specified planets. [...]

exclude_surface_namesnew optional :: array[string]

The track cannot play on surfaces with specified name. [...]

The track cannot play on surfaces with specified name. [...]

sound optional :: Sound

Static music track. [...]

Static music track. [...]

variable_sound optional :: VariableAmbientSoundVariableSound

Variable music track. [...]

Variable music track. [...]

Properties

type :: "ambient-sound"

Specification of the type of the prototype.

name :: string

Unique textual identification of the prototype.

title :: string optional new

Alternative name of the track. It doesn't need to be unique.

weight :: double optional

Default: 1

Cannot be less than zero.

Cannot be defined if track_type is "hero-track" or "script-track".

track_type :: AmbientSoundType

planets :: array[SpaceLocationID] optional new

The track can play only on specified planets.

If neither planets nor surface_names is given, the track plays on space platforms and in the space map.

Cannot be defined if track_type is "script-track".

Cannot be defined when play_on_all_surfaces is true.

surface_names :: array[string] optional new

The track can play only on surfaces with specified names. It's enough if the specified name is a sub-string of the surface name.

If neither planets nor surface_names is given, the track plays on space platforms and in the space map.

Cannot be defined if track_type is "hero-track" or "script-track".

Cannot be defined when play_on_all_surfaces is true.

play_on_all_surfaces :: boolean optional new

Default: false

The track can play everywhere.

Cannot be defined if track_type is "hero-track" or "script-track".

Cannot be true if planets or surface_names are defined.

exclude_planets :: array[SpaceLocationID] optional new

The track cannot play on specified planets.

Can be used only if play_on_all_surfaces is true or surface_names are defined.

Cannot be used when planets are defined.

exclude_surface_names :: array[string] optional new

The track cannot play on surfaces with specified name. It's enough if the specified name is a sub-string of the surface name.

Can be used only if play_on_all_surfaces is true or surface_names are defined.

Cannot exclude a name given in surface_names.

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

Prototypes

Types

Defines

Fulltext search for