Prototype/AmbientSound

From Official Factorio Wiki
Revision as of 16:19, 24 March 2022 by Bilka (talk | contribs) (→‎Mandatory properties: Explained track_type)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Prototype definitions » Prototype/AmbientSound


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


Prototype/AmbientSound — ambient-sound
name::string
sound::Sound
track_type::string
type::string
weight::double (optional)

Mandatory properties

type

Type: string
Specification of the type of the prototype. Must be "ambient-sound".

name

Type: string
Unique textual identification of the prototype.

sound

Type: Sound
The sound file and volume.

track_type

Type: string
This lets the game know in what instances the audio file is played.

The following types are recognized:

  • "early-game"
  • "main-track"
  • "interlude"
  • "late-game"
  • "menu-track"

"menu-track" is only played in the main menu. "early-game", "late-game" and "main-track" are all considered main tracks and played interleaved (alternating) with "interlude" tracks. "early-game" and "late-game" have no special effects compared to "main-track" meaning that are functionally the same.

Optional properties

weight

Type: double
Default: 1

Example

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