Prototype/Sound: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
Line 10: Line 10:


{{Prototype property|name|[[Types/string|string]]}}
{{Prototype property|name|[[Types/string|string]]}}
Name of the sound. Must be unique. Used in https://lua-api.factorio.com/latest/Concepts.html#SoundPath.
Name of the sound. Must be unique. Used as a https://lua-api.factorio.com/latest/Concepts.html#SoundPath.


== Optional properties ==
== Optional properties ==

Revision as of 10:55, 29 November 2019

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

Template:Prototype TOC

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", "environment", "walking" and "alert".

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

Template:Prototype property Array of tables with the following members:

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

Template:Prototype property Mandatory 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.