This type is used to produce sound from in-game entities when they are working/idle.
Inherits from MainSound |
main_sounds optional | :: MainSound or array[MainSound] | If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored. |
If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored. | ||
max_sounds_per_prototype optional | :: uint8 | Sets a maximum limit on how many entities of the same prototype will play their working sound. [...] |
Sets a maximum limit on how many entities of the same prototype will play their working sound. [...] | ||
extra_sounds_ignore_limit optional | :: bool | If |
If | ||
persistent optional | :: bool | When |
When | ||
use_doppler_shift optional | :: bool | |
idle_sound optional | :: Sound | The sound to be played when the entity is idle. [...] |
The sound to be played when the entity is idle. [...] | ||
activate_sound optional | :: Sound | Might not work with all entities that use working_sound. [...] |
Might not work with all entities that use working_sound. [...] | ||
deactivate_sound optional | :: Sound | Might not work with all entities that use working_sound. [...] |
Might not work with all entities that use working_sound. [...] | ||
sound_accents optional | :: SoundAccent or array[SoundAccent] | Unused when |
Unused when |
sound optional | :: Sound | Cannot be empty. |
Cannot be empty. | ||
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 |
Can't be used when | ||
fade_out_ticks optional | :: uint32 | Can't be used when |
Can't be used when | ||
activity_to_volume_modifiers optional | :: ActivityMatchingModifiers | |
activity_to_speed_modifiers optional | :: ActivityMatchingModifiers | |
match_progress_to_activity optional | :: bool | Unused when WorkingSound::persistent is |
Unused when WorkingSound::persistent is | ||
match_volume_to_activity optional | :: bool | |
match_speed_to_activity optional | :: bool | |
play_for_working_visualisations optional | :: array[string] | Array of WorkingVisualisation::names, individual names cannot be empty. [...] |
Array of WorkingVisualisation::names, individual names cannot be empty. [...] | ||
volume_smoothing_window_size optional | :: uint32 | Only used if WorkingSound::persistent is |
Only used if WorkingSound::persistent is |
activate_sound optional | :: Sound | Might not work with all entities that use working_sound. [...] |
Might not work with all entities that use working_sound. [...] | ||
deactivate_sound optional | :: Sound | Might not work with all entities that use working_sound. [...] |
Might not work with all entities that use working_sound. [...] | ||
extra_sounds_ignore_limit optional | :: bool | If |
If | ||
idle_sound optional | :: Sound | The sound to be played when the entity is idle. [...] |
The sound to be played when the entity is idle. [...] | ||
main_sounds optional | :: MainSound or array[MainSound] | If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored. |
If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored. | ||
max_sounds_per_prototype optional | :: uint8 | Sets a maximum limit on how many entities of the same prototype will play their working sound. [...] |
Sets a maximum limit on how many entities of the same prototype will play their working sound. [...] | ||
persistent optional | :: bool | When |
When | ||
sound_accents optional | :: SoundAccent or array[SoundAccent] | Unused when |
Unused when | ||
use_doppler_shift optional | :: bool |
activity_to_speed_modifiers optional | :: ActivityMatchingModifiers | |
activity_to_volume_modifiers optional | :: ActivityMatchingModifiers | |
fade_in_ticks optional | :: uint32 | Can't be used when |
Can't be used when | ||
fade_out_ticks optional | :: uint32 | Can't be used when |
Can't be used when | ||
match_progress_to_activity optional | :: bool | Unused when WorkingSound::persistent is |
Unused when WorkingSound::persistent is | ||
match_speed_to_activity optional | :: bool | |
match_volume_to_activity optional | :: bool | |
play_for_working_visualisations optional | :: array[string] | Array of WorkingVisualisation::names, individual names cannot be empty. [...] |
Array of WorkingVisualisation::names, individual names cannot be empty. [...] | ||
probability optional | :: double | Modifies how often the sound is played. [...] |
Modifies how often the sound is played. [...] | ||
sound optional | :: Sound | Cannot be empty. |
Cannot be empty. | ||
volume_smoothing_window_size optional | :: uint32 | Only used if WorkingSound::persistent is |
Only used if WorkingSound::persistent is |
If this property is defined, all properties inherited from MainSound (and not overridden here) are ignored.
Sets a maximum limit on how many entities of the same prototype will play their working sound.
Inactive entities without an idle_sound
don't count towards this limit.
Entities with their working sound fading out don't count towards this limit.
Unused when persistent
is true
.
Default: false
If true
, entities playing their extra sound don't count towards max_sounds_per_prototype
limit. 'extra sound' refers to idle_sound
, activate_sound
or deactivate_sound
.
Unused when persistent
is true
.
Default: false
When true
, working sounds for all entities of the same prototype are combined into one.
Default: true
The sound to be played when the entity is idle. Might not work with all entities that use working_sound.
Unused when persistent
is true
.
Might not work with all entities that use working_sound.
Unused when persistent
is true
.
Might not work with all entities that use working_sound.
Unused when persistent
is true
.
Unused when persistent
is true
.
-- refinery
working_sound =
{
sound = {filename = "__base__/sound/oil-refinery.ogg"},
idle_sound = {filename = "__base__/sound/idle1.ogg", volume = 0.6},
}
-- roboport
working_sound =
{
sound = {filename = "__base__/sound/roboport-working.ogg", volume = 0.6, audible_distance_modifier = 0.5},
max_sounds_per_prototype = 3,
probability = 1 / (5 * 60) -- average pause between the sound is 5 seconds
}