Ambient Rooms

So you want that extra layer of awesomeness in your map, well keep on reading!

NOTE: This does not work properly in splitscreen, so if you care about that i'm sorry!

First you have to download the script below.

⬇ Download

Once you've done that you can place the script in the following folder:

mapname\scripts\zm

Now we need to add the line below in your "mapname.csc"

#using scripts\zm\_ambient_room;

Next we need to copy "_zm_audio.csc" into the same folder as before ( this file can be found in your share\raw folder ) We will replace the function sndZmbLaststand with the code below:

function sndZmbLaststand(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
{
    if( newVal )
    {
        PlaySound( localClientNum, "chr_health_laststand_enter", (0,0,0) );
        self.inLastStand = true;
        setsoundcontext ("laststand", "active");

        if( !IsSplitScreen() )
        {
            forceambientroom( "sndHealth_LastStand" );
        }
    }
    else
    {
        if( IS_TRUE( self.inLastStand ) )
        {
            playsound( localClientNum, "chr_health_laststand_exit", (0,0,0) );
            self.inLastStand = false;

            if( !IsSplitScreen() )
            {
                if( isdefined( level.active_ambient_room ) )
                    forceambientroom( level.active_ambient_room );
                else
                    forceambientroom( "" );
            }
        }

        setsoundcontext ("laststand", "");
    }

}

And we have to add the lines below in your zone

scriptparsetree,scripts/zm/_ambient_room.csc
scriptparsetree,scripts/zm/_zm_audio.csc
stringtable,sound/ambients/ambient_mod.csv //this is whatever csv u are using for the ambient rooms

Now that this part is out of the way we can start doing the fun stuff, so ambient rooms are defined in "ambient_mod.csv" (this is setup by default u can just create a new csv and change it in your .szc file )

This file is located in:

Black Ops 3 Root\share\raw\sound\ambients

By default it contains this:

Name,Loadspec,DefaultRoom,Reverb,ReverbDryLevel,ReverbWetLevel,EntityContextType0,EntityContextValue0,EntityContextType1,EntityContextValue1,EntityContextType2,EntityContextValue2,GlobalContextType,GlobalContextValue,Loop,Duck
mp_mod_outdoor,mpl_mod,yes,global_urban_outdoor,1,1,ringoff_plr,outdoor,water,over,,,ringoff_plr,outdoor,,

I had to make a small change on this to prevent the setsoundcontext function not working all the time ( this is used in the script to set certain conditions for aliases ) Removing outdoor on the EntityContextValue0 column made it work for me, this is only needed for the default room. In the script u can change the default room u want in ur map, if you are not in a trigger it will fallback to the room u have defined in there. My advice is just to have all area's covered in triggers so you won't really have to worry it. Below u can see the small change i did:

mp_mod_outdoor,mpl_mod,yes,global_urban_outdoor,1,1,ringoff_plr,,water,over,,,ringoff_plr,outdoor,,

Here are some of the columns explained:

List of stock reverbs u can use:

cinematic
cp_lotus_main_room
default
default_new_paches
doa_fps_mode
factory_evt_boiler
factory_evt_chainroom
factory_evt_dome
factory_evt_hangar
factory_evt_tallroom
factory_evt_tele_a
factory_evt_tele_b
factory_hallway
factory_largeroom
factory_largeroom_2
factory_mediumroom
factory_partialroom
factory_sewerpipe
factory_smallroom
factory_urban_outdoor
factory_urban_outdoor_2
global_hallway
global_hangar
global_hugeroom
global_largeroom
global_mediumroom
global_partialroom
global_sewerpipe
global_smallroom
global_splitscreen
global_traincar
global_tunnel
global_underwater
global_urban_outdoor
hub_monsters_outdoor
mp_final_killcam
shock_flashbang
singapore_outdoor
sndHealth_LastStand
sndHealth_LowHealth
sndHealth_Melee
test
underwater

Radiant Setup:

To setup ambient rooms we need some "trigger_multiple" to make it all work together! The trigger will activate the Ambient Room defined in the properties, below are some of the kvp's explained that are required for this.

targetname: ambient_room ( all triggers need this targetname or it will not work )

script_ambientroom:

script_ambientpriority:  ( this is for when you have overlapping triggers, higher number is more priority )

Also make sure that you have CLIENTSIDE_TRIGGER checked!

The size of the trigger is the size of the Ambient Room so make sure u cover everything properly!

Sound Context:

This is used in sound aliases to play or prevent certain sounds this is setup in column names like below:

The most common contexts that are used are "ringoff_plr" and "water", they both have specific values. ( can be found in sound\context folder )

ringoff_plr

water

So all stock weapons have setup decay and underwater sounds, since they are setup correct. In this way you get a nice long decay when you are outdoor, but a short one if you are indoor. Same goes for the underwater part.

ReverbSend:

This is also used by sound aliases to control how much reverb can be given to that particular sound, higher number means more reverb on the sound. This can create really nice effect in certain rooms like a sewer.

If you have any questions or i fucked up something please send me a dm or message on Twitter