Prototype/Sound: Difference between revisions
(Created page with "== Basics == Prototype type: '''sound''' Specifies a sound that can be used with https://lua-api.factorio.com/latest/Concepts.html#SoundPath during runtime. == Mandatory pro...") |
(Set prototype parent) |
||
Line 1: | Line 1: | ||
{{Prototype parent}} | |||
== Basics == | == Basics == | ||
Prototype type: '''sound''' | Prototype type: '''sound''' |
Revision as of 14:53, 24 July 2019
Prototype definitions » Prototype/Sound
Basics
Prototype type: sound
Specifies a sound that can be used with https://lua-api.factorio.com/latest/Concepts.html#SoundPath during runtime.
Mandatory properties
type
Type: Types/string
Must be "sound".
name
Type: Types/string
Name of the sound. Must be unique. Used in https://lua-api.factorio.com/latest/Concepts.html#SoundPath.
Optional properties
category
Type: Types/string
Default: "game-effect"
One of "game-effect", "gui-effect", "environment", "walking" and "alert".
aggregation
Type: Types/table
Table with the following members:
- max_count - Types/uint32 - Mandatory.
- progress_threshold - Types/float - Optional. - Default: 1.0 - If count already playing is true, this will determine maximum progress when instance is counted toward playing sounds.
- remove - Types/bool - Mandatory.
- count_already_playing - Types/bool - Optional. - Default: false - If true already playing sounds are taken into account when checking maxCount.
audible_distance_modifier
Type: Types/double
Default: 1.0
variations
Type: Types/table of Types/tables
Array of tables with the following members:
- filename - Types/FileName - Mandatory.
- volume - Types/float - Optional. - Default: 1.0
- preload - Types/bool - Optional.
filename
Type: Types/FileName
Mandatory if variations
is not given.
volume
Type: Types/float
Default: 1.0
Only loaded if variations
is not given.
preload
Type: Types/bool
Only loaded if variations
is not given.