Factorio Prototype DocsVersion 2.0.20

VariableAmbientSoundLayerStateProperties :: struct

Properties

enabled optional :: bool
variant optional :: uint8

Index of a layer's variant. [...]

Index of a layer's variant. [...]

sequence_length optional :: RandomRange

Number of samples in a sequence. [...]

Number of samples in a sequence. [...]

number_of_repetitions optional :: RandomRange or ProbabilityTable

The number of times a layer repeats itself until it's considered finished. [...]

The number of times a layer repeats itself until it's considered finished. [...]

start_pause optional :: RandomRange

Pause before a layer starts playing.

Pause before a layer starts playing.

pause_between_samples optional :: RandomRange

Pause between individual samples within a sequence. [...]

Pause between individual samples within a sequence. [...]

pause_between_repetitions optional :: RandomRange

Pause between each repetition of a layer. [...]

Pause between each repetition of a layer. [...]

end_pause optional :: RandomRange

Pause before a layer finishes playing. [...]

Pause before a layer finishes playing. [...]

silence_instead_of_sample_probability optional :: float

A sample replaced by silence still counts as played for the purposes of sequence count, repetition count, pauses, etc. [...]

A sample replaced by silence still counts as played for the purposes of sequence count, repetition count, pauses, etc. [...]

Properties

enabled :: bool optional

variant :: uint8 optional

Index of a layer's variant.

Cannot be zero.

sequence_length :: RandomRange optional

Number of samples in a sequence.

The minimum cannot be zero.

Mandatory for layers with "semi-randomized" VariableAmbientSoundCompositionMode.

Applicable for layers with "randomized" VariableAmbientSoundCompositionMode.

Cannot be defined for layers with "shuffled" VariableAmbientSoundCompositionMode.

number_of_repetitions :: RandomRange or ProbabilityTable optional

The number of times a layer repeats itself until it's considered finished. If it's not defined, the layer never finishes on its own. What counts as repetition depends on the VariableAmbientSoundCompositionMode.

Each sample played is counted as a repetition of "randomized" layer.

Repetition of "semi-randomized" layer is counted when its sequence is finished.

Repetition of "shuffled" layer is counted when all samples play once.

Each sample played is counted as a repetition of "layer-controlled" layer.

If number_of_repetitions of VariableAmbientSoundLayer::control_layer of "layer-controlled" layer is smaller than number_of_repetitions of the controlled layer, number_of_repetitions of the control layer is used for the purposes of pause_between_repetitions and end_pause.

Cannot be zero.

start_pause :: RandomRange optional

Pause before a layer starts playing.

pause_between_samples :: RandomRange optional

Pause between individual samples within a sequence.

Cannot be defined for "randomized" layers without defining sequence_length as well. Alternatively, use pause_between_repetitions instead.

Cannot be defined for layers with sublayer_offset defined.

pause_between_repetitions :: RandomRange optional

Pause between each repetition of a layer. The repetition is not counted until the pause finishes.

end_pause :: RandomRange optional

Pause before a layer finishes playing. The last repetition and consequently the layer being finished is not counted until the pause finishes.

silence_instead_of_sample_probability :: float optional

Default: 0.0

A sample replaced by silence still counts as played for the purposes of sequence count, repetition count, pauses, etc.

Must be in the [0.0, 1.0] interval.

Prototypes

Types

Defines