Adding sounds and objectives
Sounds and objectives in SP (and COOP) maps
Adding sounds or objectives to SP maps while keeping them compatible with the standard SWAT 4 game bears some notable limitations. If you don't want to create a separate mod, you need to choose a label for the map. The setting can be found from View->Level Properties->Label. Then the map will be assigned automatically the objectives associated with that label. You can only choose sounds or music that have the same label.
The upside to this approach is obviously the fact that players can install the map very easily without having any hassle of installing new mods. The downside is that the sound world will be limited and objectives may not match 'the storyline' accurately.
One other approach, short of creating a new mod from scratch, is to use the Ambient Sound Mod v1.0 which lets you choose from any ambient sounds for any map, but then again all the players will need to have the same mod installed if you try to play in multiplayer instead of just single player. That causes a major hassle and may not be worth the inconvenience.
Sound system explained briefly
SWAT 4 does not use the standard Unreal sound stuff at all, so the UDN site won't help you, and Unreal's AmbientSound property does not work.
There are 3 main sound objects that are used to play ambient sounds and music in SWAT maps. They are AmbientSound (in the SwatEd class browser under Actor\Keypoint), SoundMarker (under Actor\SoundMarkerBase) and MusicMarker (under Actor\SoundMarkerBase).
AmbientSound
These are for playing 3D (positional) looping ambient sounds. The sound starts when you enter its OuterRadius (set in the Specification) and stops when you leave its OuterRadius. Within the OuterRadius, the sound gets louder as you near the marker and softer as you near the OuterRadius. They can be listened to in the SwatEd's Sound Browser by opening the package SW_ambients.uax
.
SoundMarker
These are for playing 2D (non-positional) sounds. Unlike AmbientSounds, these don't start/stop based on the Specification's OuterRadius. In a SoundMarker, a Specification is triggered when you cross the marker and if looping will play forever or until a new SoundMarker is crossed. When a new SoundMarker is crossed that specifies a different sound, the new sound plays and the old sound stops. By default, the sound files can be found from Content\Sounds\StreamingAudio
.
Here's an example of typical usage: To play a "Wind" sound outdoors and a "RoomTone" sound indoors, one could place 2 SoundMarkers on either side of a doorway. The marker on the outside specifies the "Wind" sound and the marker on the inside, the "RoomTone" sound. Now when you enter the building through this door, the "RoomTone" sound plays. When you go outside, the "Wind" marker plays and the "RoomTone" stops.
MusicMarker
These are for playing dynamic music, where the marker triggers the basic 'exploring' music and combat triggers the corresponding 'action' music. These, too, can be found from Content\Sounds\StreamingAudio
.
SP map labels
Below is the list of all 'useful' labels found from System\MissionObjectives.ini
. Some weird test labels that are probably of no use in serious maps were omitted.
Ambient sound and music marker tags are located in System\SoundEffects.ini
. Because the file is several megabytes and thus quite hard to browse, all the available map labels and their corresponding sounds are listed below for convenience. Note that many (if not all) of the sound labels are identical in MP maps.
Map label | Objectives | AmbientSound labels | SoundMarker labels | MusicMarker labels |
---|---|---|---|---|
SP-FoodWall |
Neutralize_Jimenez |
a01AirCond |
s01Inside
|
m01Food |
SP-FairfaxResidence |
Neutralize_All_Enemies |
a02CricketsLo |
s02Basement |
m02Fairfax1 |
SP-ConvenienceStore |
Neutralize_All_Enemies |
a03Atm |
s03Inside |
m03ConvA |
SP-ABomb |
Neutralize_All_Enemies |
a04Amplifier |
s04Inside |
m04Abomb |
SP-AutoGarage |
Neutralize_All_Enemies |
a05CarAlarm |
s05Garage |
m05Auto1 |
SP-RedLibrary |
Neutralize_All_Enemies |
a06CopyMachBig |
s06Upstairs |
m06Red |
SP-Casino |
Neutralize_All_Enemies |
a07CeilingFan |
s07Inside |
m07Casino |
SP-JewelryHeist |
Neutralize_All_Enemies |
a08Car |
s08BackStairs |
m08JewelA |
SP-Tenement |
Neutralize_All_Enemies |
a09DripsBsmt |
s09Rain |
m09Tenement |
SP-Hospital |
Neutralize_All_Enemies |
a10Beep |
s10Inside |
m10Hosp |
SP-ArmsDeal |
Neutralize_All_Enemies |
a11Crickets |
s11Inside |
m11Arms1 |
SP-Hotel |
Neutralize_All_Enemies |
a12Alarm |
s12Inside |
m12HotelA |
SP-DNA |
Neutralize_All_Enemies |
a13Hollow |
s13Lobby |
m13Dna |
SP-Arcade |
Neutralize_All_Enemies |
expm01AmplifierHum |
Arcade_Amb_Rain_Outside |
expm01Arcade1
|
SP-HalfwayHouse |
Neutralize_All_Enemies |
a09Light |
Hostel_Amb_Bathroom |
expm02HalfwayHouse1 |
SP-Backstage |
Neutralize_All_Enemies |
a00Hollow |
Theatre_Amb_Freezer |
expm03Backstage1 |
SP-Office |
Neutralize_All_Enemies |
expm04BasementDrips |
Office_Amb_Basement |
expm04Office1 |
SP-DrugLab |
Neutralize_All_Enemies |
expm03Traffic |
DrugLab_Amb_Backyard |
expm05Druglab1 |
SP-Subway |
Neutralize_All_Enemies |
exp06WallPanel |
Subway_Bathroom |
expm06Subway1 |
SP-Warehouse |
Neutralize_All_Enemies |
expm07AirCond |
Warehouse_Amb_Offices |
expm07Warehouse1 |