Prototype/AmbientSound: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
mNo edit summary
(0.16)
Line 2: Line 2:
This prototype is used to make sound, while playing the game. This includes background noise, such as trees and wind, or the in-game's music, composed by Daniel James Taylor.
This prototype is used to make sound, while playing the game. This includes background noise, such as trees and wind, or the in-game's music, composed by Daniel James Taylor.
==Properties==
==Properties==
Inherits all properties from [[Prototype]].
=== type ===
'''Type''': [[Types/string]]
 
Specification of the type of the prototype. Must be "ambient-sound".
 
=== name ===
'''Type''': [[Types/string]]
 
Unique textual identification of the prototype.
 
===track_type===
===track_type===
'''Type''': [[Types/string]]
'''Type''': [[Types/string]]
Line 8: Line 17:
This lets the game know in what instances the audio file is played.
This lets the game know in what instances the audio file is played.


The ones the game uses are as follows:
The following types are recognized:


   "early-game"
   "early-game"
   "main-track"
   "main-track"
   "interlude"
   "interlude"
  "late-game"
===sound===
===sound===
'''Type''': [[Types/Sound]]
'''Type''': [[Types/Sound]]


This links the sound file, and volume to the prototype.
The sound file and volume.
 
=== weight ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
==Example==
==Example==
   {
   {

Revision as of 16:01, 19 May 2018

Basics

This prototype is used to make sound, while playing the game. This includes background noise, such as trees and wind, or the in-game's music, composed by Daniel James Taylor.

Properties

type

Type: Types/string

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

name

Type: Types/string

Unique textual identification of the prototype.

track_type

Type: Types/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"

sound

Type: Types/Sound

The sound file and volume.

weight

Type: Types/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
   }
 },