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 id directory>
    <event name source/>
</HeistMusic>

<HeistMusic ...>

<event name source>

<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.

Example

This example is what you would put inside your main node within your mod config

<HeistMusic id="my_heist_music_name" directory="sounds">
    <event name="setup" source="stealth.ogg"/>
    <event name="anticipation" source="buildup.ogg"/>
    <event name="assault" source="assault.ogg"/>
    <event name="control" source="control.ogg"/>
</HeistMusic>

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

<event name="assault">
    <track source="assault.ogg" weight="10"/>
    <track source="assault_lyrics.ogg" weight="1"/>
</event>

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

Last updated