Prototype/Sound
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/SoundPrototype.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 Specifies a sound that can be used with https://lua-api.factorio.com/latest/Concepts.html#SoundPath during runtime.
Mandatory properties
Template:Prototype property Must be "sound".
Template:Prototype property Name of the sound. Must be unique. Used as a https://lua-api.factorio.com/latest/Concepts.html#SoundPath.
Optional properties
Template:Prototype property One of "game-effect", "gui-effect", "ambient", "environment", "walking", "alert" and "wind".
This defines which slider in the sound settings affects the volume of this sound. Furthermore, some sound types are mixed differently than others, e.g. zoom level effects are applied.[1]
Template:Prototype property 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.
Template:Prototype property Array of tables with the following members:
- filename - FileName - Mandatory. Supported sound file formats are
.ogg
,.wav
and.voc
. - volume - float - Optional. - Default: 1.0
- preload - bool - Optional.
- speed - float - Optional. - Default: 1.0 - Speed must be >= 1 / 64. This sets both min and max speed.
- min_speed - float - Optional. Not loaded if speed is present. - Default: 1.0 - Speed must be >= 1 / 64.
- max_speed - float - Mandatory if min_speed is present, otherwise not loaded. - Default: 1.0 - Must be >= min_speed.
Template:Prototype property
Mandatory if variations
is not given.
Support sound file formats are .ogg
, .wav
and .voc
.
Template:Prototype property
Only loaded if variations
is not given.
Template:Prototype property
Only loaded if variations
is not given.
Template:Prototype property
Only loaded if variations
is not given. Speed must be >= 1 / 64. This sets both min and max speed.
Template:Prototype property
Only loaded if variations
is not given. Not loaded if speed is present. Speed must be >= 1 / 64.
Template:Prototype property
Only loaded if variations
is not given. Mandatory if min_speed is present, otherwise not loaded. Must be >= min_speed.