Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# AdvancedVolumeControl - Prototype Docs

## AdvancedVolumeControl :: struct

## Properties

- default
- sorted

attenuation optional | :: Fade | Volume reduction (fade-out) controlled by distance (fraction of audible distance).
Volume reduction (fade-out) controlled by distance (fraction of audible distance).
fades optional | :: Fades | Volume reduction (fade-out) or increase (fade-in) controlled by zoom level.
Volume reduction (fade-out) or increase (fade-in) controlled by zoom level.
darkness_threshold optional | :: float | Has to be in the range [-1.0, 1.0]. [...]
Has to be in the range [-1.0, 1.0]. [...]

attenuation optional | :: Fade | Volume reduction (fade-out) controlled by distance (fraction of audible distance).
Volume reduction (fade-out) controlled by distance (fraction of audible distance).
darkness_threshold optional | :: float | Has to be in the range [-1.0, 1.0]. [...]
Has to be in the range [-1.0, 1.0]. [...]
fades optional | :: Fades | Volume reduction (fade-out) or increase (fade-in) controlled by zoom level.
Volume reduction (fade-out) or increase (fade-in) controlled by zoom level.

## Properties

### attenuation :: Fade optional

Volume reduction (fade-out) controlled by distance (fraction of audible distance).

### fades :: Fades optional

Volume reduction (fade-out) or increase (fade-in) controlled by zoom level.

### darkness_threshold :: float optional

Default: `0`

Has to be in the range [-1.0, 1.0].

Positive values are used for night sounds, the volume of the sound is 1.0 when darkness = threshold, 0.0 when darkness = 0.0 and linearly interpolated in between.

Negative values are used for day sounds, the sound of the sound is 0.0 when darkness = -threshold, 1.0 when darkness = 1.0 and linearly interpolated in between.

Type used in

- Sound::advanced_volume_control
- SoundPrototype::advanced_volume_control