Prototype/AmbientSound: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
mNo edit summary
(Converted to SMW format)
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Basics==
{{Prototype parent}}
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 the in-game's music, composed by Daniel James Taylor.
==Properties==
Inherits all properties from [[Prototype]].
===track_type===
'''Type''': [[Types/string]]


{{Prototype TOC|ambient-sound}}
==Mandatory properties==
{{Prototype property|type|[[Types/string|string]]}}
Specification of the type of the prototype. Must be "ambient-sound".
{{Prototype property|name|[[Types/string|string]]}}
Unique textual identification of the prototype.
{{Prototype property|sound|[[Types/Sound|Sound]]}}
The sound file and volume.
{{Prototype property|track_type|[[Types/string|string]]}}
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"
* "main-track"
* "interlude"
* "late-game"
 
== Optional properties ==


  "early-game"
{{Prototype property|weight|[[Types/double|double]]|1|optional=true}}
  "main-track"
  "interlude"
===sound===
'''Type''': [[Types/Sound]]


This links the sound file, and volume to the prototype.
== Example ==
==Example==
   {
   {
     type = "ambient-sound",
     type = "ambient-sound",

Revision as of 21:58, 27 July 2019

Prototype definitions » Prototype/AmbientSound


This prototype is used to make sound, while playing the game. This includes the in-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"

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