Heist Music
Updated for version 4.4.
Module Definition
The module is inherited from ItemModuleBase. So base parameters can be found there.
This modules creates a heist track.
Module name
The name of the module you use as the meta of the module definition is 'HeistMusic' or 'HeistMusicModule' if _force_search
is set to true in the module definition.
XML Structure
<HeistMusic ...>
<HeistMusic ...>
id
String
The ID of the track. This has to be unique
volume
Float
The volume of the music (from 0 to 1)
<event name source>
<event name source>
name
String
The name of the event. At the moment it can only be setup
for stealth, anticipation
for build up, assault
and control
source
String
The path to the .ogg file that the track should play in the event
start_source
String
Optional path to sound to play before playing source
volume
Float
Volume of this specific music event
allow_switch
Bool
Wether a random track is selected each loop or only once per event if multiple tracks are available (See <track>
node)
weight
Integer
Base weight of any tracks added via <track>
nodes (See <track>
node)
play_order
String
Order in which multiple tracks are played, possible values are random
(default), shuffle
, sequence
and loop
<track source>
<track>
nodes can be placed as children of <event>
nodes to specify multiple tracks for a single event.
They inherit any values set on the <event>
node if not specified in the <track>
node itself.
source
String
The path to the .ogg file that the track should play in the event
start_source
String
Optional path to sound to play before playing source
volume
Float
Volume of this specific music track
weight
Integer
Weight of this track for being chosen randomly
Example
This example is what you would put inside your main node within your mod config
This will add the track. You will still need to localize the name of the track. In this case menu_jukebox_my_heist_music_name and menu_jukebox_screen_my_heist_music_name will need to be localized.
Having multiple tracks for a single event will allow you to create a random track selection, similar to how "Ode to Greed" or "Break the Rules" have a chance to play a lyric version of their assault tracks. For this you would simply set up an event like this
The weight defines how likely a track is going to be selected whenever this event plays. In the example above this would mean the regular assault track is 10 times more likely to play than the lyric version.
Template
Download template here: https://modworkshop.net/mydownloads.php?action=view_down&did=21651
Functions
Get
MakeBuffer(String source)
XAudioBuffer
Called by RegisterHook to create an XAudio buffer
Last updated