This wiki is about 0.17, the current experimental version of Factorio.

Information about 0.16, the current stable version of Factorio, can be found on stable.wiki.factorio.com.

Prototype/Sound

From Official Factorio Wiki
Jump to: navigation, search

Prototype definitions » Prototype/Sound


Specifies a sound that can be used with https://lua-api.factorio.com/latest/Concepts.html#SoundPath during runtime.


Prototype/Sound — sound
name::string
type::string
aggregation::table (optional)
audible_distance_modifier::double (optional)
category::string (optional)
filename::FileName (optional)
preload::bool (optional)
variations::table (array) of tables (optional)
volume::float (optional)

Mandatory properties

type

Type: string
Must be "sound".

name

Type: string
Name of the sound. Must be unique. Used in https://lua-api.factorio.com/latest/Concepts.html#SoundPath.

Optional properties

category

Type: string
Default: "game-effect"
One of "game-effect", "gui-effect", "environment", "walking" and "alert".

aggregation

Type: table
Table with the following members:

  • max_count - uint32 - Mandatory.
  • progress_threshold - float - Optional. - Default: 1.0 - If count already playing is true, this will determine maximum progress when instance is counted toward playing sounds.
  • remove - bool - Mandatory.
  • count_already_playing - bool - Optional. - Default: false - If true already playing sounds are taken into account when checking maxCount.

audible_distance_modifier

Type: double
Default: 1.0

variations

Type: table (array) of tables
Array of tables with the following members:

  • filename - FileName - Mandatory.
  • volume - float - Optional. - Default: 1.0
  • preload - bool - Optional.

filename

Type: FileName
Mandatory if variations is not given.

volume

Type: float
Default: 1.0
Only loaded if variations is not given.

preload

Type: bool
Only loaded if variations is not given.