Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## Sound :: struct or array[SoundDefinition] Example code

## Properties

- default
- sorted

category optional | :: SoundType |
priority optional | :: uint8 | Sounds with higher priority will replace a sound with lower priority if the maximum sounds limit is reached. [...]
Sounds with higher priority will replace a sound with lower priority if the maximum sounds limit is reached. [...]
aggregation optional | :: AggregationSpecification |
allow_random_repeat optional | :: bool |
audible_distance_modifier optional | :: double | Modifies how far a sound can be heard. [...]
Modifies how far a sound can be heard. [...]
game_controller_vibration_data optional | :: GameControllerVibrationData |
advanced_volume_control optional | :: AdvancedVolumeControl |
speed_smoothing_window_size optional | :: uint32 |
variations optional | :: SoundDefinition or array[SoundDefinition] |
filename optional | :: FileName | Supported sound file formats are `.ogg` (Vorbis) and `.wav`. [...]
Supported sound file formats are `.ogg` (Vorbis) and `.wav`. [...]
volume optional | :: float | Only loaded if `variations` is not defined. [...]
Only loaded if `variations` is not defined. [...]
min_volume optional | :: float | Only loaded if `variations` and `volume` are not defined. [...]
Only loaded if `variations` and `volume` are not defined. [...]
max_volume optional | :: float | Only loaded if `variations` is not defined. [...]
Only loaded if `variations` is not defined. [...]
preload optional | :: bool | Only loaded if `variations` is not defined.
Only loaded if `variations` is not defined.
speed optional | :: float | Speed must be `>= 1 / 64`. [...]
Speed must be `>= 1 / 64`. [...]
min_speed optional | :: float | Must be `>= 1 / 64`. [...]
Must be `>= 1 / 64`. [...]
max_speed optional | :: float | Must be `>= min_speed`. [...]
Must be `>= min_speed`. [...]
modifiers optional | :: SoundModifier or array[SoundModifier] | Only loaded if `variations` is not defined.
Only loaded if `variations` is not defined.

advanced_volume_control optional | :: AdvancedVolumeControl |
aggregation optional | :: AggregationSpecification |
allow_random_repeat optional | :: bool |
audible_distance_modifier optional | :: double | Modifies how far a sound can be heard. [...]
Modifies how far a sound can be heard. [...]
category optional | :: SoundType |
filename optional | :: FileName | Supported sound file formats are `.ogg` (Vorbis) and `.wav`. [...]
Supported sound file formats are `.ogg` (Vorbis) and `.wav`. [...]
game_controller_vibration_data optional | :: GameControllerVibrationData |
max_speed optional | :: float | Must be `>= min_speed`. [...]
Must be `>= min_speed`. [...]
max_volume optional | :: float | Only loaded if `variations` is not defined. [...]
Only loaded if `variations` is not defined. [...]
min_speed optional | :: float | Must be `>= 1 / 64`. [...]
Must be `>= 1 / 64`. [...]
min_volume optional | :: float | Only loaded if `variations` and `volume` are not defined. [...]
Only loaded if `variations` and `volume` are not defined. [...]
modifiers optional | :: SoundModifier or array[SoundModifier] | Only loaded if `variations` is not defined.
Only loaded if `variations` is not defined.
preload optional | :: bool | Only loaded if `variations` is not defined.
Only loaded if `variations` is not defined.
priority optional | :: uint8 | Sounds with higher priority will replace a sound with lower priority if the maximum sounds limit is reached. [...]
Sounds with higher priority will replace a sound with lower priority if the maximum sounds limit is reached. [...]
speed optional | :: float | Speed must be `>= 1 / 64`. [...]
Speed must be `>= 1 / 64`. [...]
speed_smoothing_window_size optional | :: uint32 |
variations optional | :: SoundDefinition or array[SoundDefinition] |
volume optional | :: float | Only loaded if `variations` is not defined. [...]
Only loaded if `variations` is not defined. [...]

## Properties

### category :: SoundType optional

### priority :: uint8 optional

Default: `127`

Sounds with higher priority will replace a sound with lower priority if the maximum sounds limit is reached.

0 is the highest priority, 255 is the lowest priority.

### aggregation :: AggregationSpecification optional

### allow_random_repeat :: bool optional

Default: `false`

### audible_distance_modifier :: double optional

Default: `1.0`

Modifies how far a sound can be heard. Must be between `0` and `1` inclusive.

### game_controller_vibration_data :: GameControllerVibrationData optional

### advanced_volume_control :: AdvancedVolumeControl optional

### speed_smoothing_window_size :: uint32 optional

Default: `0`

### variations :: SoundDefinition or array[SoundDefinition] optional

### filename :: FileName optional

Supported sound file formats are `.ogg` (Vorbis) and `.wav`.

Only loaded, and mandatory if `variations` is not defined.

### volume :: float optional

Default: `1.0`

Only loaded if `variations` is not defined.

This sets both min and max volumes.

Must be `>= 0`.

### min_volume :: float optional

Default: `1.0`

Only loaded if `variations` and `volume` are not defined.

Must be `>= 0`.

### max_volume :: float optional

Default: `1.0`

Only loaded if `variations` is not defined.

Only loaded if `min_volume` is defined.

Must be `>= min_volume`.

### preload :: bool optional

Only loaded if `variations` is not defined.

### speed :: float optional

Default: `1.0`

Speed must be `>= 1 / 64`. This sets both min and max speeds.

Only loaded if `variations` is not defined.

### min_speed :: float optional

Default: `1.0`

Must be `>= 1 / 64`.

Only loaded if both `variations` and `speed` are not defined.

### max_speed :: float optional

Default: `1.0`

Must be `>= min_speed`.

Only loaded if `variations` is not defined. Only loaded, and mandatory if `min_speed` is defined.

### modifiers :: SoundModifier or array[SoundModifier] optional

Only loaded if `variations` is not defined.

## Example

    {
      filename = "__base__/sound/ambient/world-ambience-3.ogg",
      volume = 1.2
    }

Type used in

- AgriculturalTowerPrototype::planting_sound
- AgriculturalTowerPrototype::harvesting_sound
- AmbientSound::sound
- ArmorPrototype::takeoff_sound
- ArmorPrototype::landing_sound
- ArmorPrototype::steps_sound
- ArmorPrototype::moving_sound
- AsteroidCollectorPrototype::munch_sound
- AsteroidCollectorPrototype::deposit_sound
- AsteroidCollectorPrototype::arm_extend_sound
- AsteroidCollectorPrototype::arm_retract_sound
- CarPrototype::sound_no_fuel
- CargoLandingPadPrototype::robot_animation_sound
- CharacterPrototype::heartbeat
- CharacterPrototype::eat
- ConstructionRobotPrototype::repairing_sound
- CyclicSound::begin_sound
- CyclicSound::middle_sound
- CyclicSound::end_sound
- DecorativePrototype::walking_sound
- DropDownStyleSpecification::opened_sound
- EnemySpawnerPrototype::dying_sound
- EntityGhostPrototype::medium_build_sound
- EntityGhostPrototype::large_build_sound
- EntityGhostPrototype::huge_build_sound
- EntityGhostPrototype::small_build_animated_sound
- EntityGhostPrototype::medium_build_animated_sound
- EntityGhostPrototype::large_build_animated_sound
- EntityGhostPrototype::huge_build_animated_sound
- EntityPrototype::build_sound
- EntityPrototype::mined_sound
- EntityPrototype::mining_sound
- EntityPrototype::rotated_sound
- EntityPrototype::open_sound
- EntityPrototype::close_sound
- EntityWithHealthPrototype::repair_sound
- ExplosionPrototype::sound
- GatePrototype::opening_sound
- GatePrototype::closing_sound
- InterruptibleSound::sound
- InterruptibleSound::stopped_sound
- ItemPrototype::open_sound
- ItemPrototype::close_sound
- ItemPrototype::pick_sound
- ItemPrototype::drop_sound
- ItemPrototype::inventory_move_sound
- LayeredSound
- LayeredSound::layers
- LightningPrototype::sound
- LogisticContainerPrototype::animation_sound
- MainSound::sound
- NightVisionEquipmentPrototype::activate_sound
- NightVisionEquipmentPrototype::deactivate_sound
- PersistentWorldAmbientSoundDefinition
- PersistentWorldAmbientSoundDefinition::sound
- PlaySoundTriggerEffectItem::sound
- ProcessionAudio::sound
- ProcessionAudioCatalogueItem::sound
- ProgrammableSpeakerNote::sound
- RailPrototype::walking_sound
- ResourceEntityPrototype::walking_sound
- RocketSiloPrototype::alarm_sound
- RocketSiloPrototype::quick_alarm_sound
- RocketSiloPrototype::clamps_on_sound
- RocketSiloPrototype::clamps_off_sound
- RocketSiloPrototype::doors_sound
- RocketSiloPrototype::raise_rocket_sound
- RocketSiloRocketPrototype::flying_sound
- SegmentPrototype::dying_sound
- SegmentedUnitPrototype::roar
- SegmentedUnitPrototype::hurt_roar
- SelectionModeData::started_sound
- SelectionModeData::ended_sound
- SemiPersistentWorldAmbientSoundDefinition
- SemiPersistentWorldAmbientSoundDefinition::sound
- SoundAccent::sound
- SpiderUnitPrototype::dying_sound
- SpiderUnitPrototype::warcry
- StyleWithClickableGraphicalSetSpecification::left_click_sound
- TileBuildSound::small
- TileBuildSound::medium
- TileBuildSound::large
- TileBuildSound::animated
- TilePrototype::walking_sound
- TilePrototype::landing_steps_sound
- TilePrototype::driving_sound
- TilePrototype::build_sound
- TilePrototype::mined_sound
- TurretPrototype::starting_attack_sound
- TurretPrototype::dying_sound
- TurretPrototype::preparing_sound
- TurretPrototype::folding_sound
- TurretPrototype::prepared_sound
- TurretPrototype::prepared_alternative_sound
- UnitPrototype::warcry
- UnitPrototype::dying_sound
- UnitPrototype::walking_sound
- UtilitySounds::gui_click
- UtilitySounds::list_box_click
- UtilitySounds::build_small
- UtilitySounds::build_medium
- UtilitySounds::build_large
- UtilitySounds::build_huge
- UtilitySounds::cannot_build
- UtilitySounds::build_blueprint_small
- UtilitySounds::build_blueprint_medium
- UtilitySounds::build_blueprint_large
- UtilitySounds::build_blueprint_huge
- UtilitySounds::build_ghost_upgrade
- UtilitySounds::build_ghost_upgrade_cancel
- UtilitySounds::build_animated_small
- UtilitySounds::build_animated_medium
- UtilitySounds::build_animated_large
- UtilitySounds::build_animated_huge
- UtilitySounds::deconstruct_small
- UtilitySounds::deconstruct_medium
- UtilitySounds::deconstruct_large
- UtilitySounds::deconstruct_huge
- UtilitySounds::deconstruct_robot
- UtilitySounds::rotated_small
- UtilitySounds::rotated_medium
- UtilitySounds::rotated_large
- UtilitySounds::rotated_huge
- UtilitySounds::axe_mining_ore
- UtilitySounds::axe_mining_stone
- UtilitySounds::mining_wood
- UtilitySounds::axe_fighting
- UtilitySounds::alert_destroyed
- UtilitySounds::console_message
- UtilitySounds::scenario_message
- UtilitySounds::new_objective
- UtilitySounds::game_lost
- UtilitySounds::game_won
- UtilitySounds::metal_walking_sound
- UtilitySounds::research_completed
- UtilitySounds::default_manual_repair
- UtilitySounds::crafting_finished
- UtilitySounds::inventory_click
- UtilitySounds::inventory_move
- UtilitySounds::clear_cursor
- UtilitySounds::armor_insert
- UtilitySounds::armor_remove
- UtilitySounds::achievement_unlocked
- UtilitySounds::wire_connect_pole
- UtilitySounds::wire_disconnect
- UtilitySounds::wire_pickup
- UtilitySounds::tutorial_notice
- UtilitySounds::smart_pipette
- UtilitySounds::switch_gun
- UtilitySounds::picked_up_item
- UtilitySounds::paste_activated
- UtilitySounds::item_deleted
- UtilitySounds::entity_settings_pasted
- UtilitySounds::entity_settings_copied
- UtilitySounds::item_spawned
- UtilitySounds::confirm
- UtilitySounds::undo
- UtilitySounds::drop_item
- UtilitySounds::rail_plan_start
- UtilitySounds::default_landing_steps
- UtilitySounds::segment_dying_sound
- VariableAmbientSoundLayer::variants
- VariableAmbientSoundVariableSound::intermezzo
- WorkingSound
- WorkingSound::idle_sound
- WorkingSound::activate_sound
- WorkingSound::deactivate_sound
- WorldAmbientSoundDefinition
- WorldAmbientSoundDefinition::sound