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

# Factorio Prototype Docs Version 2.0.7

## MainSound :: struct

Children WorkingSound

## Properties

- default
- sorted

sound optional | :: Sound |
audible_distance_modifier optional | :: double | Modifies how far a sound can be heard. [...]
Modifies how far a sound can be heard. [...]
probability optional | :: double | Modifies how often the sound is played.
Modifies how often the sound is played.
fade_in_ticks optional | :: uint32 | Can't be used when `match_progress_to_activity` is true.
Can't be used when `match_progress_to_activity` is true.
fade_out_ticks optional | :: uint32 | Can't be used when `match_progress_to_activity` is true.
Can't be used when `match_progress_to_activity` is true.
activity_to_volume_modifiers optional | :: ActivityMatchingModifiers |
activity_to_speed_modifiers optional | :: ActivityMatchingModifiers |
match_progress_to_activity optional | :: bool |
match_volume_to_activity optional | :: bool |
match_speed_to_activity optional | :: bool |
play_for_working_visualisations optional | :: array[string] |

activity_to_speed_modifiers optional | :: ActivityMatchingModifiers |
activity_to_volume_modifiers optional | :: ActivityMatchingModifiers |
audible_distance_modifier optional | :: double | Modifies how far a sound can be heard. [...]
Modifies how far a sound can be heard. [...]
fade_in_ticks optional | :: uint32 | Can't be used when `match_progress_to_activity` is true.
Can't be used when `match_progress_to_activity` is true.
fade_out_ticks optional | :: uint32 | Can't be used when `match_progress_to_activity` is true.
Can't be used when `match_progress_to_activity` is true.
match_progress_to_activity optional | :: bool |
match_speed_to_activity optional | :: bool |
match_volume_to_activity optional | :: bool |
play_for_working_visualisations optional | :: array[string] |
probability optional | :: double | Modifies how often the sound is played.
Modifies how often the sound is played.
sound optional | :: Sound |

## Properties

### sound :: Sound optional

### audible_distance_modifier :: double optional

Default: `1`

Modifies how far a sound can be heard. Can only be 1 or lower, has to be a positive number.

### probability :: double optional

Default: `1`

Modifies how often the sound is played.

#### Example

    probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds

### fade_in_ticks :: uint32 optional

Default: `0`

Can't be used when `match_progress_to_activity` is true.

### fade_out_ticks :: uint32 optional

Default: `0`

Can't be used when `match_progress_to_activity` is true.

### activity_to_volume_modifiers :: ActivityMatchingModifiers optional

### activity_to_speed_modifiers :: ActivityMatchingModifiers optional

### match_progress_to_activity :: bool optional

Default: `false`

### match_volume_to_activity :: bool optional

Default: `false`

### match_speed_to_activity :: bool optional

Default: `false`

### play_for_working_visualisations :: array[string] optional

Type used in

- RollingStockPrototype::elevated_rail_sound
- WorkingSound::main_sounds