Skip to content

Sound layers ​

The world says what plays by default: its music, its combat music and its ambient sound, each a sound source (a track with its options, or a Music Album) chosen in the Worlds editor. Other things can play their own over it, each in a layer. The highest layer that has something for a channel wins, for the music and for the ambient sound on their own:

LayerWho sets itPlays while
Worldthe Worlds editoralways, as the base
Zonethe Music, Combat music and Ambient sound of a zonethe party is in the zone (a sub-zone takes the sound of the zone above)
Weatherthe Sound container of a weatherthe weather is on
Shelterthe Weather sounds of a shelterthe camera is in a shelter and a weather the shelter knows is on
Eventthe actions Set Music Track and Set Ambience Trackthe source plays
Menuthe menu music of the Gameplay Configa menu is on: the main menu, character creation, the loading screen, or the pause menu over the game

The combat music has its own, shorter list: the world, the zone and the encounter (the encounter's wins). It takes the place of the music while the party is in combat.

So a storm over a swamp: the swamp zone plays its frogs, the storm puts its rain over them, and when the party steps into a cabin the cabin's rain-on-the-roof replaces the rain; the music stays with the zone because neither the storm nor the cabin has music. Step out and the rain comes back; the storm ends and the frogs are alone again.

Rules ​

  • Each channel is chosen on its own. A storm that has only an ambient sound leaves the music to the zone.
  • A change crossfades over the seconds of whatever changed (the fade seconds of a weather, the look blends of a zone, a second and a half for a shelter). The same source twice is not started again.
  • A menu is over everything. The menu layer is the top layer, so the pause menu's music plays over the game's, even in a fight (the combat music comes back when the game goes on, if the party is still fighting). A menu with no music of its own leaves the layers below as they are; the main menu, character creation and the loading screen start with no layers below.
  • Combat music wins over every other music layer. It follows the combat state of the party (it ends a few seconds after the last fight: Gameplay Config > Audio). When it ends the music of the layers comes back. A fight with no combat music anywhere leaves the music as it is.
  • A source plays by its own rules. A track loops (with an optional pause between plays) or plays once; an album plays its tracks in its order with its pauses. A track or an album that is played once, or an album that is over, gives way to what is under it.
  • A Dynamic Music is a source like any other: it plays as the music of its layer, a track or an album from a higher layer stops it, and when that layer goes it starts again in its start state. While the party is in combat a Dynamic Music of the world, a zone or a weather goes to its Combat state; one that is the combat music of an encounter is driven by the fight. See Dynamic Music.
  • A source can be different at night. A source with Different at night plays its night version between the sunset and the sunrise of the world's sun (Day and night): the sound crossfades when the sun goes down. A source whose night version says nothing is the same all day, and a layer with only a night version says nothing by day, so the layer below plays.
  • Ambient sound is a track, not an album: it is background noise that changes with the place.
  • Leaving the world clears all the layers. The next world sets its own.
  • The world loads its tracks when it starts. It looks through its zones, weather, encounters and the music actions of its events for every track and album and asks for them to be loaded (Music Albums).
  • A weather's ambient sound is quieter in a light weather: its volume follows the intensity (half the intensity is 6 dB quieter).

Events ​

The Set Music Track and Set Ambience Track actions take the event layer:

Action valueWhat it does
Play trackThe track is the event layer: it plays over the zone, the weather and the shelter. Loop track off: it plays once, then the layer goes and what is under it comes back
Stop and Fade stopThe sound stops and the track of the event is dropped. What is under it plays again the next time a layer changes
ClearTakes the track of the event off and brings what is under it back over the Fade duration

The actions play a sound source: a track with Loop (off = once), a Pause between plays, a Volume and a Fade; Set Music Track can also play an album. Actions made before sources, with a track path, keep working. The values of the older actions did not change (Clear is added last).

For developers ​

AudioManager.set_sound_sources(layer, music, ambience, fade, ambience_gain_db) sets both channels of a layer from sound sources, set_sound_source_channel(layer, channel, source, fade) one of them, set_combat_source(layer, source, fade) the combat music of a layer, clear_sound_layer(layer, fade) and clear_sound_channel(...) take them off (set_sound_layer with track paths still works). The layers are held by SoundLayers. See Weather, shelters and sound: how they are built.