Prototype/AmbientSound
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/AmbientSound.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
Template:Prototype parent This prototype is used to make sound while playing the game. This includes the game's music, composed by Daniel James Taylor.
Mandatory properties
Template:Prototype property Specification of the type of the prototype. Must be "ambient-sound".
Template:Prototype property Unique textual identification of the prototype.
Template:Prototype property The sound file and volume.
Template:Prototype property 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
Example
{ type = "ambient-sound", name = "world-ambience-4", track_type = "interlude", sound = { filename = "__base__/sound/ambient/world-ambience-4.ogg", volume = 1.2 } },