Types/Sound
Basics
This type is either a table with the properties listed in #Optional properties, or an array of tables with the following members:
- filename - Types/FileName - Mandatory.
- volume - Types/float - Optional. - Default: 1.0
- preload - Types/bool - Optional.
- speed - Types/float - Optional. - Default: 1.0 - Speed must be >= 1 / 64. This sets both min and max speed.
- min_speed - Types/float - Optional. Not loaded if speed is present. - Default: 1.0 - Speed must be >= 1 / 64.
- max_speed - Types/float - Mandatory if max_speed is present, otherwise not loaded. - Default: 1.0 - Must be >= min_speed.
Optional properties
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.
allow_random_repeat
Type: Types/bool
Default: false
audible_distance_modifier
Type: Types/double
Default: 1.0
variations
Type: Types/table (array) 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.
- speed - [[Types/float] - Optional. - Default: 1.0 - Speed must be >= 1 / 64. This sets both min and max speed.
- min_speed - Types/float - Optional. Not loaded if speed is present. - Default: 1.0 - Speed must be >= 1 / 64.
- max_speed - Types/float - Mandatory if max_speed is present, otherwise not loaded. - Default: 1.0 - Must be >= min_speed.
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.
speed
Type: Types/float
Default: 1.0
Only loaded if variations
is not given. Speed must be >= 1 / 64. This sets both min and max speed.
min_speed
Type: Types/float
Default: 1.0
Only loaded if variations
is not given. Not loaded if speed is present. Speed must be >= 1 / 64.
max_speed
Type: Types/float
Default: 1.0
Only loaded if variations
is not given. Mandatory if max_speed is present, otherwise not loaded. Must be >= min_speed.
Example
{ filename = "__base__/sound/ambient/world-ambience-3.ogg", volume = 1.2 }
Prototype properties that use this type
- Prototype/AmbientSound : sound
- Prototype/ArtilleryTurret : rotating_stopped_sound
- Prototype/ArtilleryWagon : rotating_stopped_sound
- Prototype/Car : sound_no_fuel
- Prototype/Character : eat
- Prototype/Character : heartbeat
- Prototype/ConstructionRobot : repairing_sound
- Prototype/Decorative : walking_sound
- Prototype/EnemySpawner : dying_sound
- Prototype/Entity : build_sound
- Prototype/Entity : close_sound
- Prototype/Entity : mined_sound
- Prototype/Entity : mining_sound
- Prototype/Entity : open_sound
- Prototype/Entity : rotated_sound
- Prototype/Entity : vehicle_impact_sound
- Prototype/EntityGhost : large_build_sound
- Prototype/EntityGhost : medium_build_sound
- Prototype/EntityWithHealth : repair_sound
- Prototype/Explosion : sound
- Prototype/Gate : close_sound
- Prototype/Gate : open_sound
- Prototype/Item : close_sound
- Prototype/Item : open_sound
- Prototype/LogisticContainer : animation_sound
- Prototype/NightVisionEquipment : activate_sound
- Prototype/NightVisionEquipment : deactivate_sound
- Prototype/Rail : walking_sound
- Prototype/ResourceEntity : walking_sound
- Prototype/RocketSilo : alarm_sound
- Prototype/RocketSilo : clamps_off_sound
- Prototype/RocketSilo : clamps_on_sound
- Prototype/RocketSilo : doors_sound
- Prototype/RocketSilo : flying_sound
- Prototype/RocketSilo : raise_rocket_sound
- Prototype/Tile : mined_sound
- Prototype/Tile : walking_sound
- Prototype/Turret : dying_sound
- Prototype/Turret : folding_sound
- Prototype/Turret : prepared_alternative_sound
- Prototype/Turret : prepared_sound
- Prototype/Turret : preparing_sound
- Prototype/Turret : starting_attack_sound
- Prototype/Unit : dying_sound
- Prototype/Unit : walking_sound
- Prototype/UtilitySounds : achievement_unlocked
- Prototype/UtilitySounds : alert_destroyed
- Prototype/UtilitySounds : armor_insert
- Prototype/UtilitySounds : armor_remove
- Prototype/UtilitySounds : axe_fighting... further results