Assets
Modding
Modding
  • Introduction
  • How to add new items
  • How to add new events
  • How to add new stashes
  • How to add new tutorial message
  • How to add weapon HUD image
  • How to add new weapon and ammo
  • How to edit traders
  • How to add language
  • How to add new quest
  • How to add PDA markers
  • How to change in-game SFX
  • How to add ambient sounds to level
  • How to add new dialogue
  • How to change player data
  • How to add new enemy
Powered by GitBook
On this page

How to add ambient sounds to level

This tutorial will help you to understand ambient system and how it works

All levels has ambient sounds, because without them game will be silent.

Ambient manager placed at assets/gameplay/ambient_manager.json

The JSON structure of ambient object is:

ambient_manager.json
{
    "level_id":[
	"intro",
	"manikovsky",
	"forest_road"
	],
    "ambient": "amb_day1.mp3",
    "ambient_volume": -30.0,
    "ambient_bg_volume": 0,
    "random_sfx_delay": [3.75, 6.0],
    "random_sfx": [
	"ambient_sfx/rnd_bird_1.mp3",
	"ambient_sfx/rnd_bird_2.mp3",
	"ambient_sfx/rnd_bird_3.mp3",
	"ambient_sfx/rnd_bird_4.mp3",
	"ambient_sfx/rnd_bird_5.mp3",
	"ambient_sfx/rnd_bird_6.mp3",
	"ambient_sfx/rnd_crow_1.mp3",
	"ambient_sfx/rnd_crow_2.mp3",
	"ambient_sfx/rnd_crow_3.mp3"
    ],
    "background_ambients": [
	"amb_day1_bg.mp3",
	"ambient_sfx/dist_wind_1.mp3"
    ],
    "background_ambients_volumes":[
	0,
	-10.0
    ]
}
Properties description
level_id = list of levels where current ambient structure will be played
ambient = main looped music or sound file from assets/sounds/ folder (Layer 1)
ambient_volume = volume of the main ambient, where 0 is 100% and -88 is 0%
ambient_bg_volume = volume of whole "background_ambients" list
random_sfx_delay = delay between [A sec, B sec] when sfx will be randomly played
random_sfx = list of one shot sounds from assets/sounds/ (Layer 2)
background_ambients = list of loop sounds from assets/sounds/ (Layer 3)
background_ambients_volumes = optional property, overwrite volumes of layer 3 sounds

So you need to find best volume friendship between these layers to fit all sounds.

Make sure, that "level_id" list contains level id only for one ambient structure, because if two or more structures contains same level id, game will choose first structure and ignore others!

PreviousHow to change in-game SFXNextHow to add new dialogue

Last updated 5 months ago

Structure of ambient system