Changes

Jump to navigation Jump to search
→‎What's new for everything else: + custom jukebox tracks in 1.6.0 build 24067
Line 6,573: Line 6,573:  
| <samp>CustomFields</samp>
 
| <samp>CustomFields</samp>
 
| The [[#Custom data fields|custom fields]] for this entry.
 
| The [[#Custom data fields|custom fields]] for this entry.
 +
|}
 +
 +
===Custom jukebox tracks===
 +
You can now change [[jukebox]] audio tracks by editing the new <samp>Data/JukeboxTracks</samp> data asset.
 +
 +
This consists of a string → model lookup, where...
 +
* The key is the [[#Custom audio|audio cue ID]] to play.
 +
* The value is a model with the fields listed below.
 +
 +
If the player has heard a music track not listed in <samp>Data/JukeboxTracks</samp>, it's automatically available with the title set to the cue name. To disable a track, add an entry with <samp>"Available": false</samp>.
 +
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! effect
 +
|-
 +
| <samp>Name</samp>
 +
| ''(Optional)'' A [[Modding:Tokenizable strings|tokenizable string]] for the music track's in-game title. Defaults to the ID.
 +
|-
 +
| <samp>Available</samp>
 +
| ''(Optional)'' Whether the track should be shown in the jukebox menu. Default true.
 +
|-
 +
| <samp>AlternativeTrackIds</samp>
 +
| ''(Optional)'' A list of other cue names for this audio track. If the player has heard any of these track IDs, this entry is available in the menu. Default none.
 +
 +
For example, this can be used when renaming a track to keep it unlocked for existing players:
 +
<syntaxhighlight lang="js">
 +
"{{ModId}}_TrackName": {
 +
    "Name": "{{i18n: track-name}}",
 +
    "AlternativeTrackIds": [ "OldTrackName" ]
 +
}
 +
</syntaxhighlight>
 
|}
 
|}
  
translators
8,438

edits

Navigation menu