Sound and Vehicles

Overview

Sound events can be set in the vehicle's script file. These can be found by default in: Game\Scripts\Entities\Vehicles\Implementations\Xml\yourvehiclename.xml. This is the designer friendly way of changing sound groups for your vehicle.

The two important parameters you will need are "eventGroup" and "eventGroupFunc". The former being responsible for engine run sounds and alike and the latter for accessories sounds such as warning beeps, etc.

So to change these groups to your custom events just enter your custom project name under each parameter respectively.

Example Setup

<MovementParams>
  <SoundParams
    eventGroup="hmmwv"
    eventGroupFunc="hmmwv"
    engineSoundPosition="engine"
    id="idSound"/>
</MovementParams>

Event Values

For vehicles, values are passed to the sound events. These values update the FMOD parameters in the sound events. The following table provides an example by showing the values used by the run sound of vehicles. These parameters need to be used in lower-case in FMOD.

Parameter

Description

distance

The roll-off of the sound.

rpm_scale

Vehicle engine RPM; typically, the vehicle is idle at a value of 0.2 and at full speed at a value of 0.8, with the high value of 1.0 reserved for boost or offload conditions.

speed

On ground speed.

in_out

If the listener in or out of the vehicle, the designer may want to alternate between in and out of the vehicle for 1st and 3rd person views. Can be either 0 (listener inside the vehicle) or 1 (listener outside the vehicle).

surface

Different values correspond to different surface types.

thirdperson

Ambiance is played only for the driver of the vehicles; if driving is in 3rd person perspective, this parameter is used to accordingly reduce the interior ambience -0.0 corresponds to the 1st person perspective, 1.0 is the 3rd person perspective.

intensity

Translates the spring deflection to 0 – 1 scale; 0 {{ idle, 1 }} full deflection.

damage

Passes the amount of damage in a 0 – 1 scale; 0 {{ no damage, 1 }} destroyed.

scratch

Passes information about how many tires are destroyed; 0 {{ intact, 1 }} vehicle is running completely on rims.

doppler_rel

Relative speed between the sound emitter and listener (in km/h).

listener_speed

Speed of the currently active listener. Similar to the doppler parameter above but useful when in need of direct input from the currently active listener (e.g. the faster you go in a car the more quiet you want the ambiance volumes to be, etc).

slip

Manipulate sounds while skidding and using handbrake.

Example Screenshots of an LTV Setup

Distance

Rpm_scale

Speed

In_out

Surface

Vehicle Modifications (Mods)

You can also change the sound events a vehicle mod is using by using the "Modifications" parameters in the same vehicle script file. So let's say you have your base HMMWV all setup and want to have a racing modification with a more beefy and aggressive sound.

You can either setup a new vehicle.xml file for it or you can modify it by using the aforementioned parameter. Here is an example snippet from the how it looks like from SDK 3.4.1 onward:

<Modifications>
  <Modification name="racing">
    <Elems>
      <Elem idRef="idSound" name="eventGroup" value="hmmwv_race"/>
      <Elem idRef="idSound" name="eventGroupFunc" value="hmmwv_race"/>
    </Elems>
  </Modification>
</Modifications>

Note that it is important to make sure that the "idRef="idSound" is properly referenced in the movement parameters above. If you then load this modification in the game/editor it will use the modification sound events you defined here.