soundhooks

********************************************************************************

********************************************************************************

Useful console Commands

===============================================================================

mem - displays memory usage of game systems, including the sound

snd.unused - displays sounds and samples loaded which are not referenced

snd.display - disables display / prints out snd.display options

snd.display voice - displays the active virtual voice list

snd.display chase - displays properties of the object being chased by the camera

snd.display space - listener's space

snd.view - display a sound object's settings

snd.set - set a sound object's parameter value

********************************************************************************

*******************************************************************************

Load Display

===============================================================================

In the ...

LoadDisplay()

{

.. section of the configuration file the following sound hooks are available..

XTrackingSound("load_xtracking");

YTrackingSound("load_ytracking");

ZoomSound("load_zoom");

TransitionSound("load_transition");

BarSoundInterval(5);

BarSound("load_bar");

ZoomSound is played as the display starts to zoom into the selected map area.

XTrackingSound is played every few seconds as the X tracking lines select an area to zoom into.

YTrackingSound is played every few seconds as the X tracking lines select an area to zoom into.

TransitionSound is played after the zoom is complete.

BarSoundInterval is the number of progress dots moved before playing the tracking sound again

Sound effects for the load display must be place in common.lvl.

********************************************************************************

********************************************************************************

Music configuration (.mus)

===============================================================================

*.mus files configure the dynamic music. Music events are in the following

form...

Music()

{

Name("all_snowspeeder_music");

Priority(1.0);

FadeInTime(1.0);

FadeOutTime(1.0);

MinPlaybackTime(20.0);

MaxPlaybackTime(180.0);

MinInactiveTime(120.0);

SoundStream("all_snowspeeder_music");

}

Property | Description

-------------------------------------------------------------------------------

Name | Name of the music (referenced in lua script and odfs)

Priority | Priority of the music, if multiple music is scheduled to play at the same time, only music with the highest priority is heard.

FadeInTime | Length of the fade in when starting the music. (in seconds)

FadeOutTime | Length of the fade out when stopping / pausing the music. (in seconds)

MinPlaybackTime | Minimum length of time (in seconds) the music always plays back after being started.

MaxPlaybackTime | Maximum length of time (in seconds) the music should play for before stopping

MinInactiveTime | Minimum length of time (in seconds) before the music is played again.

SoundStream | Stream associated with this music.

********************************************************************************

********************************************************************************

Mission scripts (lua)

===============================================================================

-------------------------------------------------------------------------------

SetSoundEffect(soundEventType, soundPropertyName);

soundEventType can be any of the following...

"BirdScatter" : Played when birds are spawned

"Bird" : Attached to each bird

"LeafFall" : Played when a falling leaf is spawned

"ScopeDisplayAmbient" : Played when scope display is active

"ScopeDisplayZoomIn" : When scope display zooms in

"ScopeDisplayZoomOut" : When scope display zooms out

"WeaponUnableSelect" : When the weapon change button is pressed but another weapon is not available.

"WeaponModeUnableSelect" : When the weapon mode change button is pressed but another mode is not available.

"SpawnDisplayUnitChange" : When unit is changed in spawn display.

"SpawnDisplayUnitAccept" : When unit is selected in spawn display.

"SpawnDisplaySpawnPointChange" : When spawn point is changed in spawn display.

"SpawnDisplaySpawnPointAccept" : When spawn point is selected in spawn display.

"SpawnDisplayBack" : When user presses the back button and returns from the map to the unit select screen in the spawn display.

"LockOn" : played when player locks onto someone using the targetting display

"HeroesUnlocked" : when heroes are unlocked in multiplayer

SetSoundEffect(soundEventType, soundPropertyName, i);

"HeroSpawned" : when a player on Team <i> spawns in as the hero

"HeroDefeated" : when a player on Team <i> dies as the hero

soundPropertyName - Name of a SoundProperty assigned to the event

-------------------------------------------------------------------------------

SetBleedingVoiceOver(

playerTeam,

bleedTeam,

streamSoundName,

bleeding);

playerTeam : player's team number

bleedTeam : the team that's started / stopped bleeding

streamSoundName : stream sound to play when the local player is playerTeam and bleedTeam has started / stopped bleeding

bleeding : set to 1 to assign a started bleeding sound set to 0 to assign a stopped bleeding sound

NOTE: Team numbers are defined by SetTeamName in mission script for

example if SetTeamName(1, "Alliance"); and SetTeamName(2, "Empire"); are preset, team 1 is the alliance, team 2 is the empire.

-------------------------------------------------------------------------------

SetBleedingRepeatTime(repeatTime);

repeat Time : time between each repetition of the started bleeding voice over.

If this function is not called the repeatTime defaults to 30 seconds.

-------------------------------------------------------------------------------

SetPlanetaryBonusVoiceOver(

playerTeam,

bonusNum,

streamSoundName);

playerTeam : player's team number

bonusNum : the number of the bonus to be set -

0 - medical regen bonus (played on level load, heard by players team)

1 - surplus supplies bonus (played on level load, heard by players team)

2 - sensor boost bonus (played on level load, heard by players team)

3 - hero is on the battlefield (played on level load, heard by both teams)

4 - our team just got the reserves bonus (played when it happens, heard by players team)

5 - the other team just got reserves bonus (played when it happens, heard by other team)

streamSoundName : stream sound to play when the bonus occurs (or at level load if the bonus is ongoing)

-------------------------------------------------------------------------------

SetLowReinforcementsVoiceOver(

playerTeam,

lowReinforcementTeam,

streamSoundName,

numReinforcements,

isPercentage);

playerTeam : player's team number

lowReinforcementTeam : team which has low reinforcements

streamSoundName : stream sound to play when the local player is playerTeam and lowReinforcementTeam's reinforcements have dropped below numReinforcements

numReinforcements : number of reinforcements which triggers the low reinforcement stream

isPercentage : Optional argument which when set to 1 treats numReinforcements as a fraction (0..1.0) of maximum reinforcements.

-------------------------------------------------------------------------------

SetOutOfBoundsVoiceOver(playerTeam, streamSoundName);

playerTeam : player's team number

streamSoundName : name of the stream to play when the player goes out of bounds

-------------------------------------------------------------------------------

SetAmbientMusic(

playerTeam,

reinforcementCount,

musicName,

gameStage,

isPercentage);

playerTeam : player's team number

reinforcementCount : number of reinforcement count of the player's team which triggers the specified music

musicName : name of the music configuration (see section Music Configuration)

gameStage : value from 0 to 2, where 0 = beginning, 1 = middle and 2 = "end".

isPercentage : Optional argument which when set to 1 treats reinforcementCount as a fraction (0..1.0) of maximum reinforcements.

For example where team 1 is the alliance and team 2 is the empire...

SetAmbientMusic(1, 225, "all_start", 0);

SetAmbientMusic(1, 100, "all_middle", 1);

SetAmbientMusic(1, 40, "all_end", 2);

SetAmbientMusic(2, 202, "imp_start", 0);

SetAmbientMusic(2, 80, "imp_middle", 1);

SetAmbientMusic(2, 30, "imp_end", 2);

-------------------------------------------------------------------------------

SetAttackingTeam(teamIndex);

teamIndex : index of the attacking team, this is used to resolve which music and voice overs are heard when in two player split screen.

SetVictoryMusic(teamIndex, soundStreamID);

------------------------------------------

teamIndex : index of player's team

soundStreamID : ID of sound stream properties to play when player's team is victorious

-------------------------------------------------------------------------------

SetDefeatMusic(teamIndex, soundStreamID);

teamIndex : index of player's team

soundStreamID : ID of sound stream properties to play when player's team is defeated

-------------------------------------------------------------------------------

PlayAudioStream(

streamFilename,

streamID,

segmentID,

gain,

busname,

streamIndex);

streamFilename : File containing the audio stream

streamID : ID of stream within the file

segmentID : ID of segment within the stream

gain : Initial gain of the stream

busname : bus stream is assigned to (default = "Root")

streamIndex : Index of the open stream to play, streamFilename can be "" if this is specified. (NOTE : This is an optional argument)

Returns ID of the opened stream, streamIndex if it was specified or 0 if the function fails.

-------------------------------------------------------------------------------

PlayAudioStreamUsingProperties(streamFilename, soundStreamID, noOpen);

streamFilename : File containing the audio stream specified in the sound stream properties

soundStreamID : ID of the sound stream properties to play

noOpen : Set to 1 to play using a previously opened stream. (NOTE : this is an optional argument)

Returns ID of the opened stream (this may not be the stream that's playing).

-------------------------------------------------------------------------------

StopAudioStream(streamIndex, close);

streamIndex : Index of the audio stream to stop

close : Optional argument. Set to 1 to close the stream, 0 to leave the stream open.

-------------------------------------------------------------------------------

OpenAudioStream(streamFilename, streamID);

streamFilename : File containing the audio stream

streamID : ID of stream within the file

Returns ID of the opened stream or 0 if the function fails.

-------------------------------------------------------------------------------

AudioStreamAppendSegments(streamFilename, streamID, streamIndex)

streamFilename : File containing the stream to append to the currently open stream.

streamID : ID of the stream within the file

streamIndex : number returned from OpenAudioStream() which is the index of the stream to append segments to.

Returns ID of the opened stream or 0 if the function fails.

Example....

-- add gcw and cw music into tantive

musicStream = OpenAudioStream("sound\\tan.lvl", "tangcw_music")

AudioStreamAppendSegments("sound\\tan.lvl", "tancw_music", musicStream)

-------------------------------------------------------------------------------

AudioStreamComplete(streamID)

streamID : ID of the stream to query

Returns 1 if the stream has stopped, 0 otherwise.

-------------------------------------------------------------------------------

ScriptCB_SndPlaySound(soundID);

soundID : ID of sound properties to play

-------------------------------------------------------------------------------

ScriptCB_SndBusFade(busName, endGain, fadeTime, startGain);

busName : Name of the bus to fade

endGain : Final gain of the bus

fadeTime : Time to fade the bus

startGain : Start gain of the bus (NOTE : this is an optional argument)

-------------------------------------------------------------------------------

ScaleSoundParameter(groupID, parameter, scale);

groupID : Identifies the group which contains sounds that are changed

parameter : Parameter to scale on each sound within the group. Can be one of

the following...

Gain

GainDev

Pitch

PitchDev

PlayProbability

PlayInterval

PlayIntervalDev

ReverbGain

Pan

MinDistance

MuteDistance

MaxDistance

RollOff

RollIn

RollInDistance

scale : Scale factor for the parameter

e.g

ScaleSoundParameter("weapons", "MaxDistance", 1.5);

ScaleSoundParameter("weapons", "MuteDistance", 1.5);

-------------------------------------------------------------------------------

ScriptCB_SetMovieAudioBus(busID);

busID : ID of the bus which controls the movie audio volume.

-------------------------------------------------------------------------------

ScriptCB_SetDopplerFactor(dopplerFactor)

dopplerFactor : Used to exaggerate or reduce doppler effects. Default value is 1.0. To reduce doppler effects use values less than 1.0, to exaggerate use values greater than 1.0.

-------------------------------------------------------------------------------

ScriptCB_PlayInGameMusic(musicID)

musicID : ID of the music to play in game

-------------------------------------------------------------------------------

ScriptCB_StopInGameMusic()

stops the music previously played using ScriptCB_PlayInGameMusic()

-------------------------------------------------------------------------------

ScriptCB_EnableCommandPostVO(enable)

enable : set to 1 to enable command post VO, 0 to disable command post VO

-------------------------------------------------------------------------------

ScriptCB_EnableHeroMusic(enable)

enable : set to 1 to enable hero music, 0 to disable hero music

-------------------------------------------------------------------------------

ScriptCB_EnableHeroVO(enable)

enable : set to 1 to enable hero voice overs, 0 to disable hero voice overs

-------------------------------------------------------------------------------

ScriptCB_SetSpawnDisplayGain(gain, fadeTime)

gain : 0..1 - gain of the ingame bus when the spawn display is visible (default 0.2)

fadeTime : time, in seconds, to fade the ingame bus (default 3.0)

-------------------------------------------------------------------------------

ScriptCB_TriggerSoundRegionEnable(groupName, enable)

groupName : name of the trigger sound region group to enable / disable

enable : 1 to enable, 0 to disable. Enabled by default

===============================================================================

Shell

===============================================================================

Galactic Conquest VO

--------------------

{team}_planet_select - played when the planet select screen is displayed e.g all_planet_select (when the human player is the alliance)

{team}_bonus_select - played when the bonus select screen is displayed e.g all_bonus_select (when the human player is the alliance)

{team}_{mission}_select - played when a planet is selected in the planet select screen e.g all_yav1_select

{team}_{planet}_bonus - played when a planet is selected in the bonus screen e.g all_yav_bonus

{team}_won_{mission} - played when {team} wins a battle e.g all_won_nab1

{team}_lost_{mission} - played when {team} loses a battle e.g all_lost_nab2

********************************************************************************

********************************************************************************

===============================================================================

ODFs

===============================================================================

The string assigned to the sound event hook ("") must be in the following form...

"soundpropertyname"

or

"soundpropertyname defer"

In the first form soundpropertyname is the name of a SoundProperties, SoundLayered or SoundStream defined in a sound configuration file *.snd.

For example...

"grenadeeffect"

...assigns a sound property called "grenadeeffect" to the event.

The second form allows the sound lookup to be deferred until the sound is played. This means the sound can be loaded after the event is processed.

For example, if SoundProperties "grenadeeffect" is in a file effects.snd and the event is located in a file grenade.odf. If grenade.odf is loaded

first the reference to the event will cause an error and the SoundProperties will not be found. However, if the event is specified in the form

"grenadeeffect defer" the "grenadeeffect" will not be searched for until the sound event is triggered.

The following describes the sound events which are exposed for each class of object. In each ODF the object's class is defined by the ClassLabel property.

===============================================================================

Entities

===============================================================================

All entities can have a set of visual damage effects attached to them. Each visual damage effect can have an associated sound effect. This is specified

by the DamageEffectSound="" property in the following manner...

e.g

DamageStartPercent = 19.0

DamageStopPercent = 0.0

DamageEffect = "vehicleflame"

DamageEffectScale = 3.0

DamageInheritVelocity = 0.0

DamageAttachPoint = "hp_damage_1"

DamageEffectSound = "com_flame"

... when the unit's health reaches 19% the flame effect starts along with the sound effect. when the unit's health reaches 0% the flame effect and sound effect stop.

Furthermore, all entities can have sounds attached to them which play when the entity is damaged in a damage region. The syntax of DamageRegionSound

property is the following...

DamageRegionSound = "soundID regionID"

where soundID is the ID of the sound property and region is the name of the damage region.

===============================================================================

EngineSound

===============================================================================

The EngineSound parameter is used by some Entities to use control a parameterized sound which can provide a simple simulation of an engine. The EngineSound

parameter references a parameterized sound. This parameterized sound is provided the following parameters from the entity...

speed : Speed of the entity (0.0...1.0)

acceleration : Acceleration of the entity (-1.0...1.0)

height : Height the entity from the ground (0.0...1.0) - Currently only implemented for the hover.

turnontime : Time in seconds since the entity was turned on. Time defaults to 3e+38 when not turning on.

turnofftime : Time in seconds since the entity started to turn off. Time defaults to 3e+38 when not turning off.

winduptime : Time in seconds since the entity started to wind up / take off. Time defaults to 3e+38 when not winding up. - Currently only implemented for the flyers / carriers.

winddowntime : Time in seconds since the entity started to wind down / land. Time defaults to 3e+38 when not landing. - Currently only implemented for flyers / carriers.

strain : Amount the engine is straining for a hover (0.0..1.0) or amount the vehicle is turning for a flyer (0.0..1.0).

proximity : 0 when the distance to a target is greater than ProximityMaxDist 1 when the distance to a target is less than ProximityMinDist

-------------------------------------------------------------------------------

ClassLabel = "dusteffect"

-------------------------------------------------------------------------------

SpawnSound = "" : Sound played when dust effect is spawned

-------------------------------------------------------------------------------

ClassLabel = "walker"

-------------------------------------------------------------------------------

NOTE : FOOTSTEPS ARE NOW FOLEY EFFECTS, SEE THE FOLEY EFFECTS SECTION BELOW

HydraulicSound = "" : Played when the foot is raised above HydraulicSoundHeight

HydraulicSoundHeight = "" : Value which specifies how high a foot has to be raised before playing the HydraulicSound

HydraulicLowerSound = "" : Played when the foot is lowered below HydraulicLowerHeight

HydraulicLowerHeight = "" : Value which specifies how low the foot has to be lowered before playing the HydraulicLowerSound.

HurtSound = "" : Played when walker is hit

DeathSound = "" : Played when walker is destroyed

DamageRegionSound = "" : Played when walker is hurt by a damage region

Music = "" : Music configuration (described above) which is played when the player starts moving the vehicle above MusicSpeed for MusicDelay time. (player is on any team)

AllMusic = "" : Music when player is Alliance

ImpMusic = "" : Music when player is Empire

RepMusic = "" : Music when player is Republic

CISMusic = "" : Music when player is CIS

MusicSpeed = "" : Speed which must be exceeded before Music is played.

MusicDelay = "" : Time at MusicSpeed before music is played

EngineSound = "" : A SoundParameterized which generates the engine sound.

The walker provides "acceleration", "speed", "health", "turnontime" and "turnofftime" as application parameters to map to sound parameters. For more info. on creating parameterized sounds see \SoundFL\docs\readme.txt. Acceleration and speed are dependant upon the vehicle's properties where health is always in the range 0..1.0 where 1.0 is full health and 0 is no health.

TurnOnSound = "" : Played when a soldier enters the walker

TurningOffSound = "" : Played when a soldier leaves the walker

TurnOffSound = "" : Played when the walker turns off

TurnOffTime = "" : Time it takes the walker to turn off

Cockpit1stPersonSound = "" : Sound which is triggered every frame when the player is in first person mode.

Cockpit3rdPersonSound = "" : Sound which is triggered every frame when the player is in third person mode.

FootstepSound0 = "" : Played when foot 0 hits the ground

FootstepSound1 = "" : Played when foot 1 hits the ground

FootstepSound2 = "" : Played when foot 2 hits the ground

FootstepSound3 = "" : Played when foot 3 hits the ground

FootstepSound4 = "" : Played when foot 4 hits the ground

FootstepSound5 = "" : Played when foot 5 hits the ground

VehicleCollisionSound = "" : Played when the walker collides with something

After WALKERSECTION = "TURRETX" (where X is a number 0..8) in the ODF the following properties can be assigned to each turret...

TurretYawSound = "" : Played when turret yaws

TurretYawSoundPitch = "" : Scales the pitch of the sound as turret yaws

TurretPitchSound = "" : Played when turret pitches

TurretPitchoundPitch = "" : Scales the pitch of the sound as turret pitches

TurretAmbientSound = "" : Starts when the pilot starts using the turret. Stops when the pilot stops using the turret.

TurretActivateSound = "" : Plays when the pilot starts using the turret.

TurretDeactivateSound = "" : Plays when the pilot stops using the turret.

TurretStartSound = "" : Played when turret starts moving (either pitch or yaw)

TurretStopSound = "" : Played when turret stops moving (either pitch or yaw)

-------------------------------------------------------------------------------

ClassLabel = "droideka"

-------------------------------------------------------------------------------

FootstepSound0 = "" : Played when foot 0 hits the ground

FootstepSound1 = "" : Played when foot 1 hits the ground

FootstepSound2 = "" : Played when foot 2 hits the ground

HydraulicSound = "" : Played when the foot is raised above HydraulicSoundHeight

HydraulicSoundHeight = "" : Value which specifies how high a foot has to be raised before playing the HydraulicSound

HurtSound = "" : Played when walker is hit

DeathSound = "" : Played when walker is destroyed

DamageRegionSound = "" : Played when walker is hurt by a damage region

EngineSound = "" : A SoundParameterized which generates the rolling sound.

The droideka provides "acceleration", "speed", "health", "turnontime" and "turnofftime" as application parameters to map to sound parameters. For more info. on creating parameterized sounds see \SoundFL\docs\readme.txt. Acceleration and speed are dependant upon the vehicle's properties where health is always in the range 0..1.0 where 1.0 is full health and 0 is no health.

TurnOnSound = "" : Played when the droideka rolls up

TurningOffSound = "" : Played when the droideka starts to unroll

TurnOffSound = "" : Played when the droideka finished unrolling

TurnOffTime = "" : Time it takes droideka to unroll (defaults to 0.1seconds)

ShieldSound = "" : Played when shield is enabled

ShieldOffSound = "" : Played when the shield turns off

ShieldWearOffSound = "" : Played each time the shield flickers when it is wearing off after a certain amount of time.

JumpSound = "" : Played when the droideka jumps

LandSound = "" : Played when the droideka lands.

-------------------------------------------------------------------------------

ClassLabel = "tauntaun"

-------------------------------------------------------------------------------

AmbientSound = "" : Played and attached to unit when it spawns. If the sound is one shot it is retriggered when it finishes. Same properties as walker.

ClassLabel = "flyer"

-------------------------------------------------------------------------------

EngineSound = "" : See the EngineSound section above

TakeoffSound = "" : Played when flyer takes off

LandSound = "" : player when flyer lands

HurtSound = "" : Played when flyer is hit

DeathSound = "" : Played when flyer is destroyed

DamageRegionSound = "" : Played when flyer is hurt by a damage region

TurnOnSound = "" : Played when the flyer takes off

TurningOffSound = "" : Played when a soldier leaves the flyer

TurnOffSound = "" : Played when the flyer turns off

TurnOffTime = "" : Time it takes to turn off the flyer (in seconds)

TrickSound = "" : Played when the flyer performs a roll

FlipSound = "" : Played when the flyer performs a flip

Music = "" : Music configuration (described above) which is played when the player starts moving the vehicle above MusicSpeed for MusicDelay time. (player is on any team)

AllMusic = "" : Music when player is Alliance

ImpMusic = "" : Music when player is Empire

RepMusic = "" : Music when player is Republic

CISMusic = "" : Music when player is CIS

MusicSpeed = "" : Speed which must be exceeded before Music is played.

MusicDelay = "" : Time at MusicSpeed before music is played

VehicleCollisionSound = "" : Played when the flyer collides with something

Cockpit1stPersonSound = "" : Sound which is triggered every frame when the player is in first person mode.

Cockpit3rdPersonSound = "" : Sound which is triggered every frame when the player is in third person mode.

ProximityMinDist = "" : Distance from target where proximity parameter of engine is 0.

ProximityMaxDist = "" : Distance from target where proximity parameter of engine is 1.

BoostSound = "soundID threshold accelerating" :

Sound specified with ID "soundID" is played when the unit passes the "threshold". If "accelerating" is 0 the sound "soundID" is played when the unit's speed decreases below "threshold", when "accelerating" is 1 "soundID" plays when the unit's speed increases above "threshold".

For example ...

BoostSound = "allSpeederBikeBoostOn 0.5 1"

BoostSound = "allSpeederBikeBoostOff 0.4 0"

BoostSound " "allSpeederBikeBoostHigh 0.9 1"

allSpeederBikeBoostOn will play when the speed of the speederbike exceeds0.5.

allSpeederBikeBoostOff will play when the speed of the speederbike decreases below 0.4

allSpeederBikeBoostHigh will play when the speed of the speederbike increases above 0.9.

"strain" parameter of the engine increases to 1.0 in half a second when a trick is executed and then decreases to 0.0 in two seconds when the trick is complete.

After FLYERSECTION = "TURRETX" (where X is a number 0..8) in the ODF the same turret properties as the walker are available.

-------------------------------------------------------------------------------

ClassLabel = "carrier"

-------------------------------------------------------------------------------

EngineSound = "" : See EngineSound parameters

TakeoffSound = "" : Played when carrier takes off

LandSound = "" : player when carrier lands

TurnOnSound = "" : Played when a soldier enters the carrier

TurningOffSound = "" : Played when a soldier leaves the carrier

TurnOffSound = "" : Played when the carrier turns off

TurnOffTime = "" : Time it takes to turn off the carrier (in seconds)

HurtSound = "" : Played when carrier is hit

DeathSound = "" : Played when carrier is destroyed

DamageRegionSound = "" : Played when carrier is hurt by a damage region

PickupSound = "" : Played when cargo is attached

DropoffSound = "" : Played when cargo is detached

Music = "" : Music configuration (described above) which is played when the player starts moving the vehicle above MusicSpeed for MusicDelay time. (player is on any team)

AllMusic = "" : Music when player is Alliance

ImpMusic = "" : Music when player is Empire

RepMusic = "" : Music when player is Republic

CISMusic = "" : Music when player is CIS

MusicSpeed = "" : Speed which must be exceeded before Music is played.

MusicDelay = "" : Time at MusicSpeed before music is played

BoostSound = "soundID threshold accelerating" : See ClassLabel="flyer"

VehicleCollisionSound = "" : Played when the carrier collides with something

Cockpit1stPersonSound = "" : Sound which is triggered every frame when the player is in first person mode.

Cockpit3rdPersonSound = "" : Sound which is triggered every frame when the player is in third person mode.

-------------------------------------------------------------------------------

ClassLabel = "hover"

-------------------------------------------------------------------------------

EngineSound = "" : See EngineSound parameters

TurnOnSound = "" : Played when a soldier enters the hover

TurningOffSound = "" : Played when a soldier leaves the hover

TurnOffSound = "" : Played the hover finally turns off

TurnOffTime = "" : Time it takes to turn off the hover (in seconds)

HurtSound = "" : Played when hover is hit

DeathSound = "" : Played when hover is destroyed

DamageRegionSound = "" : Played when hover is hurt by a damage region

Music = "" : Music configuration (described above) which is played when the player starts moving the vehicle above MusicSpeed for MusicDelay time. (player is on any team)

AllMusic = "" : Music when player is Alliance

ImpMusic = "" : Music when player is Empire

RepMusic = "" : Music when player is Republic

CISMusic = "" : Music when player is CIS

MusicSpeed = "" : Speed which must be exceeded before Music is played.

MusicDelay = "" : Time at MusicSpeed before music is played

GroundedSound = "" : Sound played when the hover's height dips below the specified GroundedHeight.

GroundedHeight = "" : Height where the GroundedSound is triggered.

VehicleCollisionSound = "" : Played when the hover collides with something

Cockpit1stPersonSound = "" : Sound which is triggered every frame when the player is in first person mode.

Cockpit3rdPersonSound = "" : Sound which is triggered every frame when the player is in third person mode.

BoostSound = "soundID threshold accelerating" : See ClassLabel="flyer"

After FLYERSECTION = "TURRETX" (where X is a number 0..8) in the ODF the same turret properties as the walker are available.

-------------------------------------------------------------------------------

ClassLabel = "treaded"

-------------------------------------------------------------------------------

Same properties as hover.

-------------------------------------------------------------------------------

ClassLabel = "building"

ClassLabel = "armedbuilding"

ClassLabel = "animatedbuilding" etc....

-------------------------------------------------------------------------------

After BUILDINGSECTION = "TURRETX" (where X is a number 0..8) in the ODF the same turret properties as the walker are available.

BuiltSound = "" : If the building can be built, this sound is played when the building is finally built by a soldier.

BuildingSound = "" : Ambient sound

-------------------------------------------------------------------------------

ClassLabel = "soldier"

-------------------------------------------------------------------------------

HurtSound = "" : Played when solider is hit

DeathSound = "" : Played when solider dies

DamageRegionSound = "" : Played when soldier is hurt by a damage region

FootstepStride = "" : Length of the soldier's stride in world units (used for footsteps when soldier doesn't have an animator - e.g first person mode)

RunSpeed = "" : Speed threshold between walk and run in first person mode.

AcquiredTargetSound = "" : Played when AI solider acquires a target

HidingSound = "" : Played when AI solider decides to hide

ApproachingTargetSound = "" : Played when AI solider is running towards a new target

FleeSound = "" : Played when AI soldier flees

PreparingForDamageSound = "" : played when AI soldier knows it is going to be damaged (e.g grenade)

HeardEnemySound = "" : Played when AI soldier hears an enemy

HurtSound = "" : Played when solider is hit

DeathSound = "" : Played when solider is killed

ShockFadeOutTime = "" : Time in seconds to fade out the main bus when the soldier is thrown by a large explosion.

ShockFadeOutGain = "" : Gain to fade out to when soldier is shocked. Value can be between 0.0 (silence) to 1.0

ShockFadeInTime = "" : Time in seconds to fade in the main bus when the soldier hits the ground after being thrown by a large explosion.

ShockSound = "" : Played when the soldier hits the ground after being thrown by a large explosion.

ClothingRustleSound = "" : Played when each soldier's foot reaches it's maximum height.

LowHealthSound = "" : Sound which is played and attached to the soldier when the soldier's health drops below LowHealthThreshold.

LowHealthThreshold = "" : Value between 0...1 which defines when the low health sound will start playing.

EngineSound = "" : A SoundParameterized which generates the jet pack sound. The soldier provides "acceleration", "speed", "health", "turnontime" and "turnofftime" as

application parameters to map to sound parameters. For more info. on creating parameterized sounds see \SoundFL\docs\readme.txt. Acceleration and speed are dependant upon the vehicle's properties where health is always in the range 0..1.0 where 1.0 is full health and 0 is no health.

TurnOnSound = "" : Played when a soldier turns on jet pack

TurnOffSound = "" : Played when a soldier turns off jet pack

TurningOffSound = "" : Played when jet pack starts to turn off

TurnOffTime = "" : Time it takes to turn off the jet pack (in seconds)

Cockpit1stPersonSound = "" : Sound which is triggered every frame when the player is in first person mode.

Cockpit3rdPersonSound = "" : Sound which is triggered every frame when the player is in third person mode.

SoldierMusic = "" : Music played when the player spawns as the soldier

AISoldierMusic = "" : Music played when the AI spawns as the soldier

SoldierAnnouncement = "" : VO hook for soldier spawning

BoostSound = "soundID threshold accelerating" : See ClassLabel="flyer"

THE FOLLOWING ARE NOW FOLEY EFFECTS AND SHOULD BE ATTACHED TO THE TERRAIN, WATER AND GAME OBJECTS

LeftFootstepSound = "" : Played when left foot hits the ground

RightFootstepSound = "" : Played when right foot hits the ground

RollSound = "" : Played when the soldier rolls

JumpSound = "" : Played when the soldier jumps

LandSound = "" : Played when the soldier lands after a jump

Prone = "" : Played when the soldier enters prone

-- Player tactical VO

SCFieldMoveOutSound = ""

SCFieldHoldSound = ""

SCFieldFollowSound = ""

SCDriverGetInSound = ""

SCDriverGetOutSound = ""

SCPassengerMoveOutSound = ""

SCPassengerStopSound = ""

SCPassengerGetInSound = ""

SCPassengerGetOutSound = ""

SCGunnerAllClearSound = ""

SCGunnerSteadySound = ""

SCGunnerGetInSound = ""

SCGunnerGetOutSound = ""

-- AI tactical VO

AISCFieldMoveOutSound = ""

AISCFieldHoldSound = ""

AISCFieldFollowSound = ""

AISCDriverGetInSound = ""

AISCDriverGetOutSound = ""

AISCPassengerMoveOutSound= ""

AISCPassengerStopSound = ""

AISCPassengerGetInSound = ""

AISCPassengerGetOutSound= ""

AISCGunnerAllClearSound = ""

AISCGunnerSteadySound = ""

AISCGunnerGetInSound = ""

AISCGunnerGetOutSound = ""

AISCResponseYessirSound = ""

AISCResponseNosirSound = ""

-------------------------------------------------------------------------------

ClassLabel = "droid"

-------------------------------------------------------------------------------

AmbientSound = "" : Played when the droid is spawned and attached to the droid If the sound is one shot it is retriggered every time the sound stops.

Ambient2Sound = "" : Played when the droid is spawned and attached to the droid If the sound is one shot it is retriggered every time the sound stops.

HurtSound = "" : Played when droid is hit

DeathSound = "" : Played when droid is destroyed

DamageRegionSound = "" : Played when droid is hurt by a damage region

-------------------------------------------------------------------------------

ClassLabel = "powerupitem"

-------------------------------------------------------------------------------

PowerupSound = "" : Played when power up is picked up

AmbientSound = "" : Attached to the powerupitem while it's alive (not picked up or fallen through terrain). If this is a one shot sound it will be retriggered when it finishes.

-------------------------------------------------------------------------------

ClassLabel = "powerupstation"

-------------------------------------------------------------------------------

PowerupSound = "" : Played when charging

AmbientSound = "" : Attached to the powerupstation while it's alive. If this is a one shot sound it will be retriggered when it finishes.

BuiltSound = "" : If the building can be built, this sound is played when the building is finally built by a soldier.

-------------------------------------------------------------------------------

ClassLabel = "explosion"

-------------------------------------------------------------------------------

SoundProperty = "" : Played when the explosion is spawned

If this explosion produces chunks the following properties can be attached to all chunks.

ChunkInitialCollisionSound = "" : Played each time the chunk collides with something.

ChunkScrapeCollisionSound = "" : Played as the chunk slides along another object.

-------------------------------------------------------------------------------

ClassLabel = "door"

-------------------------------------------------------------------------------

OpenSound = "" : Played when the door opens

CloseSound = "" : Played when the door closes

LockedSound = "" : Played when player approaches locked door

-------------------------------------------------------------------------------

ClassLabel = "prop"

-------------------------------------------------------------------------------

SoundProperty = "" : Ambient sound attached to the prop

StartMovementSound = "" : Played when the prop starts moving

StopMovementSound = "" : Played when the prop stops moving

SoundOffset = "x y z" : Offset of sound position on the prop e.g SoundOffset = "-10 0 -50" This is for some props (cough - trash compactor) those root position is really far away from their rendered model.

SoundWhenMoving = "1" : Set to 1 to only play SoundProperty when the prop is moving. 0 to only play the SoundProperty all the time.

===============================================================================

Weapons

===============================================================================

-------------------------------------------------------------------------------

ClassLabel = "weapon"

-------------------------------------------------------------------------------

FireSound = "" : Played when weapon is fired

FireEmptySound = "" : Player when weapon is fired and empty

FireLoopSound = "" : Played when weapon is fired, stopped when weapon stops firing

ReloadSound = "" : Played when weapon is reloaded

ChargeSound = "" : Played when weapon is charging (player holding down button before releasing which causes the fire)

ChargeSoundPitch = "" : Scales the starting pitch of the charge sound. The pitch of the charge sound will transition towards the charge sound's default pitch as the weapon

increases charge.

ChargeSoundStop = "" : 1 stops charge sound when charge complete (default)

0 doesn't stop charge sound when charge is complete

ChargedSound = "" : Played when the weapon is charged

ChangeModeSound = "" : Played when weapon mode is changed

WeaponChangeSound = "" : Played when weapon is selected

OverheatSound = "" : Played when weapon is overheating, stopped when weapon is able to fire again.

OverheatSoundPitch = "" : Scales the starting pitch of the overheat sound.

The pitch of the overheat sound will transition towards the overheat sound's default pitch as the weapon cools down.

OverheatStopSound = "" : Played when weapon is has cooled down.

ClankLeftWalkSound = "" : Owner's left foot hits ground while walking

ClankRightWalkSound = "" : Owner's right foot hits ground while walking

ClankLeftRunSound = "" : Owner's left foot hits ground while running

ClankRightRunSound = "" : Owner's right foot hits ground while running

JumpSound = "" : Owner jumps

LandSound = "" : Owner lands

RollSound = "" : Owner rolls

ProneSound = "" : Owner prones

SquatSound = "" : Owner squats

StandSound = "" : Owner stands

-------------------------------------------------------------------------------

ClassLabel = "cannon"

-------------------------------------------------------------------------------

Same Properites as weapon.

-------------------------------------------------------------------------------

ClassLabel = "grenade"

-------------------------------------------------------------------------------

Same Properites as weapon.

-------------------------------------------------------------------------------

ClassLabel = "disguise"

-------------------------------------------------------------------------------

Same Properites as weapon.

-------------------------------------------------------------------------------

ClassLabel = "laser"

-------------------------------------------------------------------------------

Same Properites as weapon.

-------------------------------------------------------------------------------

ClassLabel = "launcher"

-------------------------------------------------------------------------------

Same Properites as weapon.

NOTE : The weapon charges as it locks on target. So the ChargeSound hook becomes the tracking sound.

-------------------------------------------------------------------------------

ClassLabel = "repair"

-------------------------------------------------------------------------------

Same Properites as weapon.

-------------------------------------------------------------------------------

ClassLabel = "binoculars"

-------------------------------------------------------------------------------

Same Properites as weapon.

-------------------------------------------------------------------------------

ClassLabel = "remote"

-------------------------------------------------------------------------------

Same properties as weapon with the exception of...

ChargeSound = "" : Looping sound which starts when the droid is set to self destruct and increases in pitch to SelfDestructSoundPitch where the owner destructs

and the sound stops.

SelfDestructSoundPitch = "" : Value between 0.0..1.0. This scales the ChargeSound's pitch as the starting pitch of the sound, the pitch steadly increases towards a scale of 1.0 before destroying the owner. For example a SelfDestructSoundPitch of 0.5 with ChargeSound's property's pitch set to 0.5 will start the sound playing at pitch 0.25 and increase up to 0.5.

-------------------------------------------------------------------------------

ClassLabel = "towcableweapon"

-------------------------------------------------------------------------------

Same properties as weapon with the addition of...

WindSound = "" : Looping sound which is played while the tow cable is reeling out.

DetatchSound = "" : Played when the tow cable is detached from the weapon.

-------------------------------------------------------------------------------

ClassLabel = "melee"

-------------------------------------------------------------------------------

Same properties as weapon with the addition of...

HitSound = "" : Played when the weapon hits an object

DeflectSound = "" : Played when ordanance is deflected by the weapon

Swing = "{animation time} {damage time} {soundID}" :

Sound is played when the weapon is fired. A number of swings can be specified for the weapon, one is randomly selected when the weapon is fired. Both the swing sound corresponing to the randomly specified swing and the fire sound are played.

For example a weapon may contain the following....

Swing = "0.7 0.4 swing_small"

Swing = "0.9 0.7 swing_medium"

Swing = "1.5 1.0 swing_large"

Therefore when the first swing randomly selected the animation lasts for 0.7 seconds and the animation swing_small is played. When the last swing is randomly selected the animation plays for 1.5 seconds and swing_large is played.

===============================================================================

Ordnances

===============================================================================

-------------------------------------------------------------------------------

ClassLabel = "beam"

-------------------------------------------------------------------------------

OrdnanceSound = "" : Sound attahced to the ordnance. It's played when the ordnance is created and stopped when the ordnance is destroyed.

CollisionSound = "" : Played as the ordnance collides with an object or terrain.

CollisionWaterSound = "" : Played when ordnance collides with water.

CollisionShieldSound = "" : Played when ordnance collides with a shield

-------------------------------------------------------------------------------

ClassLabel = "bullet"

-------------------------------------------------------------------------------

Same Properties as beam

-------------------------------------------------------------------------------

ClassLabel = "shell"

-------------------------------------------------------------------------------

Same Properties as beam

-------------------------------------------------------------------------------

ClassLabel = "grenade"

-------------------------------------------------------------------------------

CollisionFoliageSound = "" : Played when the grenade collides with foliage

CollisionOtherSound = "" : Played when the grenade collides with anything that isn't water or foliage.

-------------------------------------------------------------------------------

ClassLabel = "mine"

-------------------------------------------------------------------------------

TickSound = "" : Played each second timer ticks

TickSOundPitch = "" : Scales the starting pitch of the TickSound. The final pitch of the sound is specified by the sound property.

-------------------------------------------------------------------------------

ClassLabel = "laser"

-------------------------------------------------------------------------------

Same Properties as beam

-------------------------------------------------------------------------------

ClassLabel = "bolt"

-------------------------------------------------------------------------------

Same Properties as beam

-------------------------------------------------------------------------------

ClassLabel = "missile"

-------------------------------------------------------------------------------

Same Properties as beam with the addition of...

LockedOnSound = "" : Played along with OrdnanceSound when the missle is locked onto target.

-------------------------------------------------------------------------------

ClassLabel = "powerupitem"

-------------------------------------------------------------------------------

PowerupSound = "" : Played when the power up item is picked up.

-------------------------------------------------------------------------------

ClassLabel = "meleethrowordnance"

-------------------------------------------------------------------------------

OnSound = "" : Attached to the ordnance (lightsabre) when thrown.

===============================================================================

Other

===============================================================================

-------------------------------------------------------------------------------

ClassLabel = "animatedprop"

-------------------------------------------------------------------------------

KillSoldierSound = "" : Played when a soldier is killed by the prop. This is used in the case of the Sarlacc on Tatooine

AnimationTriggerSound = "animationID soundID" : Specified sound is played when the animation (animationID) is played.

-------------------------------------------------------------------------------

ClassLabel = "trap"

-------------------------------------------------------------------------------

TriggerSound = "" : Played when the trap is triggered

Furthermore each CHUNKS section can have the following hooks attached to each individual chunk.

ChunkInitialCollisionSound = "" : Played each time the chunk collides with something.

ChunkScrapeCollisionSound = "" : Played as the chunk slides along another object.

BuiltSound = "" : If the building can be built, this sound is played when the building is finally built by a soldier.

*******************************************************************************

*******************************************************************************

FX (particle effects)

===============================================================================

It is possible to attach an ambient sound to a particle effect. This is performed by modifying the SoundName("soundPropertyID") property of the ParticleEmitter() section in an .fx file. For example...

ParticleEmitter("BlackSmoke")

{

MaxParticles(20000.0000,20000.0000);

StartDelay(0.0000,0.0000);

BurstDelay(0.5000, 0.5000);

BurstCount(1.0000,1.0000);

MaxLodDist(1000.0000);

MinLodDist(800.0000);

SoundName("com_amb_heavyfire");

Size(1.0000, 1.0000);

Hue(255.0000, 255.0000);

Saturation(255.0000, 255.0000);

Value(255.0000, 255.0000);

Alpha(255.0000, 255.0000);

<...snip...>

********************************************************************************

********************************************************************************

PRPs (world prop files)

================================================================================

Sounds can be attached to foliage (props). Foliage is made up of a number of layers which are blended together to create a rich environment. Layers consist of meshes and each mesh in a can have an assoicated sound. For example...

Layer(0)

{

SpreadFactor(0.3);

Mesh()

{

GrassPatch("yav_prop_grass.odf", 50);

File("editor_grasspatch.msh", 50);

Frequency(100);

Scale(1);

Stiffness(0.0);

Sound("cricketloop");

CollisionSound("grasscrunch");

}

Mesh()

{

GrassPatch("yav_prop_grass.odf", 40);

File("editor_grasspatch.msh", 40);

Frequency(100);

Scale(1);

Stiffness(0.0);

Sound("cricketoneshot", 5.0, 1.0);

CollisionSound("grasscrunch2");

}

}

Layer 0 consists of two grass types with different visibility (50 and 40). One mesh has been assigned a looping sound "cricketloop" which is triggered when the mesh becomes visible. The other mesh is assigned a sound cricketoneshot which is triggered between 4..6 seconds after the mesh becomes visible. Furthermore, "cricketoneshot" is retriggered every 4...6 seconds.

Remember, it's possible to control the probability of a sound playing back when it is triggered by changing the playback probability of the sound. For example it's probably not a good idea for "cricketloop" to have a playback probability of 1.0 since every grasspatch mesh will contain a cricket.

The syntax of the Sound property of a Mesh is the following...

Sound(SoundPropertyName);

or

Sound(SoundPropertyName, RetriggerInterval, RetriggerIntervalDeviation);

CollisionSound is the sound played when a soldier collides with the foliage.

The syntax of the CollisionSound property of a Mesh is the following...

CollisionSound(SoundPropertyName);

*******************************************************************************

*******************************************************************************

World

===============================================================================

-------------------------------------------------------------------------------

Ambience

-------------------------------------------------------------------------------

Ambient sounds can be placed in the editor by creating a spherical region with a label in the following format...

soundstatic {soundPropertyName} {mindistancedivisor} - non streaming sound

or ...

soundstream {soundPropertyName} {mindistancedivisor} - streaming sound

for example a streaming region for a forest, which is assigned the SoundStreamProperty "forest_ambience" and a min distance of half the size of the region would be called...

soundstatic forest_ambience 2.0

It is also possible to place ambient sounds by adding the snd_amb_static.odf or snd_amb_streaming.odf entities to the world and then setting the properties.

-------------------------------------------------------------------------------

Spaces

-------------------------------------------------------------------------------

Sound spaces are acoustically seperate from the rest of the world. Each sound space can have a reverb characteristic and occlusion setting. The reverb is applied to all sounds heard by the listener within the sound space. The occlusion setting is applied to all sounds outside of the space the listener is in.

Sound space can be place in the editor by creating a (box, cylinder or sphere) region with a label in the following format...

soundspace {soundSpaceName}

For more information on sound spaces see SoundFL\docs\readme.txt

-------------------------------------------------------------------------------

TriggerRegions

-------------------------------------------------------------------------------

It's possible to trigger a sound as a player walks into a region.

A configuration file for the sound triggering regions should have the extension .tsr and should contain a number of Group() and Region() sections.

Each Group() has the following properties...

Name : Name of the group (referenced by the Region())

Reinforcements : The fraction of reinforcements the players team needs to exceed before the group is triggered.

Alliance : Sound / stream triggered when player is on the alliance team

Empire : Sound / stream triggered when player is on the empire team

Republic : Sound / stream triggered when player is on the republic team

CIS : Sound / stream triggered when player is on the CIS team

Each Region() has the following properties...

Name : Name of the region (referenced in the region name in the world)

Group : 1 or more groups associated with this region. The first group with reinforcements lower than the player team's reinforcements count is triggered while the player is in the region.

For example the file hoth.tsr could contain...

Group()

{

Name("hot_carrier_away1");

Reinforcements(0.7);

Alliance("all_vo_shipaway1");

Empire("imp_vo_shipaway1");

Republic("");

CIS("");

}

Group()

{

Name("hot_carrier_away2");

Reinforcements(0.4);

Alliance("all_vo_shipaway2");

Empire("imp_vo_shipaway2");

Republic("");

CIS("");

}

Group()

{

Name("hot_vehiclewarning");

Reinforcements(0.0);

Alliance("all_vo_warningwalkers");

Empire("all_vo_warningwalkers");

Republic("");

CIS("");

}

Region()

{

Name("hot_hanger");

Group("hot_carrier_away1");

Group("hot_carrier_away2");

}

Region()

{

Name("hot_trenches");

Group("hot_vehiclewarning");

}

Then a region (box / sphere etc.) in the region file is created for each area (a region can consist of multiple boxes, sphere etc.). The label of each region should be in the following format...

soundtrigger {regionname}

In the above example the regions would be called

soundtrigger hot_hanger

soundtrigger hot_trenches

-------------------------------------------------------------------------------

Control Zones / Command Posts

-------------------------------------------------------------------------------

Each command post has a list of voice over (VO) properties which each trigger's a SoundStreamProperty when a command post is captured, lost, goes into dispute or is saved.

The format of the command post VO properties is the follwing...

VO_{PlayerSide}_{ActionSide}Capture

VO_{PlayerSide}_{ActionSide}Lost

VO_{PlayerSide}_{ActionSide}InDispute

VO_{PlayerSide}_{ActionSide}Saved

VO_{PlayerSide}_{ActionSide}Info

For example when the player is the alliance and the alliance captures a command post the SoundStreamProperty VO_All_AllCapture is played. Similarly, if the player is the alliance and the empire loses a command post the SoundStreamProperty VO_All_ImpLost is played.

The Info stream is constantly being retriggered to give the player some information about the state of the command post (e.g "Defend the shield bunker")

The command post properties can be set either in the editor or by manually editing the world (*.wld) file.

Furthermore the command post class (not each instance of a command post) can have the following sounds attached.

ChargeSound = "" : Played while the command post is changing from neutral to be captured by a team.

CapturedSound = "" : Played when the command post is captured (neutral->captured).

DischargeSound = "" : Played while the command post is changing from captured by a team to neutral.

LostSound = "" : Played when the command post is lost (captured->netural).

DisputeSound = "" : Played as the command post goes into dispute (when an enemy soldier enters the capture zone while the command post is being captured.)

AmbientSound = "" : Constantly played at the position of the command post for its lifetime. The syntax of this is the following ...

AmbientSound = "Side soundID" for example ...

AmbientSound = "all all_commandpost_ambience"

SoundPitchDev = "" : Value between 0.0..1.0 which specifies the pitch deviation when charging and discharging a command post. For example a pitch dev of 0.5 will vary the pitch between 0.5 to 1.0 when charging a command post.

CaptureMusic = "" : Played when a human player captures a command post. The syntax of this is the following ...

CaptureMusic = "Side musicID" for example ...

CaptureMusic = "all all_commandpost_capture"

LostMusic = "" : Played when a human player captures a command post. In the case of a net game if the local player is playing as the alliance the and net opponent is playing as the empire and the opponent captures a command post this music will play for the local player. The syntax of this is the following ...

CaptureMusic = "Side musicID" for example ...

CaptureMusic = "all all_commandpost_lost"

-------------------------------------------------------------------------------

Lightning Effect

-------------------------------------------------------------------------------

The lightning effect located in the file {world}.fx can have two sounds attached. One sound for the incident lightning flash and another sound played for each sub-flash. The sounds should be 2D, resident (not streaming), and one shot (not looping).

SoundCrack = "" : ID of a sound or layered sound which is played when the first lightning flash is generated.

SoundSubCrack = "" : ID of a sound or layered sound which is played when each sub flash is generated.

*******************************************************************************

*******************************************************************************

Foley Effects (impacts, collisions)

===============================================================================

Sets of foley fx can be attached to objects within the game.

As a soldier or vehicle collides with another object the foley effects attached to the collidee are searched to find the collider and the collider's foley effects are played. For example if a solider walks across a bridge the collider would be the solider and collidee would be the bridge. The bridge is searched for the foley effect associated with the soldier's unitID (in this case a FoleyFXSoldier) and the walk effect associated with the soldier's foot colliding with the bridge is played back.

Foley effects groups are defined in an .ffx file (NOTE : the .ffx file must be loaded before the objects which reference it.)

Each object within the world should have an associated set of foley effects.

For example kam_bldg_bridge1.odf should contain a group of foley effects for each soldier on kamino.

In the file rep_inf_clone_commander.odf...

FoleyFXClass = "rep_inf"

In the file cis_inf_battledroid.odf...

FoleyFXClass = "cis_inf"

In the file kam_bldg_bridge1.odf...

FoleyFXGroup = "kam_bldg_foley"

Finally, in the .ffx file e.g kam_bldg_bridge.ffx...

FoleyFXSoldier()

{

Name("rep_inf_metal");

Class("rep_inf");

FootstepLeftWalk("rep_inf_metal_footstepleftwalk");

FootstepRightWalk("rep_inf_metal_footsteprightwalk");

FootstepLeftRun("rep_inf_metal_footstepleftrun");

FootstepRightRun("rep_inf_metal_footsteprightrun");

FootstepLeftStop("rep_inf_metal_footstepleftstop");

FootstepRightStop("rep_inf_metal_footsteprightstop");

Jump("rep_inf_metal_jump");

Land("rep_inf_metal_land");

Roll("rep_inf_metal_roll");

Prone("rep_inf_metal_prone");

Squat("rep_inf_metal_squat");

Stand("rep_inf_metal_stand");

}

FoleyFXSoldier()

{

Name("cis_inf_metal");

Class("cis_inf");

FootstepLeftWalk("cis_inf_metal_footstepleftwalk");

FootstepRightWalk("cis_inf_metal_footsteprightwalk");

FootstepLeftRun("cis_inf_metal_footstepleftrun");

FootstepRightRun("cis_inf_metal_footsteprightrun");

FootstepLeftStop("cis_inf_metal_footstepleftstop");

FootstepRightStop("cis_inf_metal_footsteprightstop");

Jump("cis_inf_metal_jump");

Land("cis_inf_metal_land");

Roll("cis_inf_metal_roll");

Prone("cis_inf_metal_prone");

Squat("cis_inf_metal_squat");

Stand("cis_inf_metal_stand");

}

FoleyFXGroup()

{

Name("kam_bldg_foley");

FoleyFX("rep_inf_metal");

FoleyFX("cis_inf_metal");

}

In this case, only the foley effects for the republic arc trooper and commander are provided.

Since terrain and water are not a game objects the terrain FoleyFXGroup should be named terrain_foley and the water FoleyFXGroup should be named water_foley.

For example...

FoleyFXGroup()

{

Name("terrain_foley");

FoleyFX("rep_inf_metal");

FoleyFX("cis_inf_metal");

}

FoleyFXGroup()

{

Name("water_foley");

FoleyFX("rep_inf_water");

FoleyFX("cis_inf_water");

}

-------------------------------------------------------------------------------

FoleyFX types

-------------------------------------------------------------------------------

Each type of object has a different set of foley effects. Currently foley effects are setup for ...

o Impact - FoleyFXImpact

o Soldier - FoleyFXSoldier

o Walker - FoleyFXWalker

And are declared in the .ffx file(s) in the following way.

FoleyFXImpact()

{

Name(""); // Name of the foley effect referenced by a FoleyFXGroup

Class(""); // Name of the object which hits the object

Impact(""); // Sound effect played when the named object hits another object

}

FoleyFXSoldier()

{

Name(""); // Name of the foley effect referenced by a FoleyFXGroup

Class(""); // Name of the soldier the effects are for.

FootstepLeftWalk(""); // Sound, walking left foot collides with object

FootstepRightWalk(""); // Sound, walking right foot collides with object.

FootstepLeftRun(""); // Sound, running left foot collides with object

FootstepRightRun(""); // Sound, running right foot collides with object

FootstepLeftStop(""); // Sound, stopping left foot first

FootstepRightStop(""); // Sound, stopping right foot first

Jump(""); // Sound, jumping from the object

Land(""); // Sound, landing on the object

Roll(""); // Sound, rolling on the object

Prone(""); // Sound, proning on the object

Squat(""); // Sound, squating on the object

Stand(""); // Sound, standing up from prone on the object

Impact(""); // Sound, played when the soldier hits another object

BodyFall(""); // Sound, played when the solider hits the ground during a tumble

}

FoleyFXWalker()

{

Name(""); // Name of the follect effect referenced by a FoleyFXGroup

Class(""); // Name of the walker the effects are for.

Walker0(""); // Sound, walking first foot collides with object

Walker1(""); // Sound, walking second foot collides with object

Walker2(""); // Sound, walking third foot collides with object

Walker3(""); // Sound, walking fourth foot collides with object

Walker4(""); // Sound, walking fifth foot collides with object

Walker5(""); // Sound, walking sixth foot collides with object

Impact(""); // Sound, played when the walker hits another object

}

-------------------------------------------------------------------------------

Collider/Collidee ODFs

-------------------------------------------------------------------------------

ALL game object can act as foley effects colliders. They should have an additional property their odf files which assigns them to a class of foley effects.

FoleyFXClass = ""

In addition ALL game objects which support collision can act as foley effects colliders and collidees. Each collidee should have an additional property its odf file which references the foley effects group (FoleyFXGroup) for all the colliders that can collide with the collidee.

FoleyFXGroup = ""