Changes

Jump to navigation Jump to search
integrate copied text into page
Line 1: Line 1:  
← [[Modding:Index|Index]]
 
← [[Modding:Index|Index]]
   −
This page explains how to use and edit audio/music in Stardew Valley 1.5.5 and onwards. This is an advanced guide for modders.
+
This page explains how to use and edit the game's music tracks and sound effects (called ''cues''). This is an advanced guide for modders.
   −
==Copied from [[Modding:Migrate to Stardew Valley 1.6]]==
+
==Audio data==
===Custom audio===
+
You can add or edit cues by editing the <samp>Data/AudioChanges</samp> [[Modding:Editing XNB files|asset]]. New cues are added to the game's soundbank, so they can be used anywhere normal audio can be used (e.g. the <samp>Music</samp> [[Modding:Maps|map property]]).
You can now add or edit [[Modding:Audio|music tracks or sound effects]] (called ''cues'') by editing the <samp>Data/AudioChanges</samp> asset. New cues are added to the game's soundbank, so they can be used anywhere normal audio can be used (e.g. the <samp>Music</samp> [[Modding:Maps|map property]]).
     −
====Format====
+
===Format===
 
The <samp>Data/AudioChanges</samp> asset consists of a string → model lookup, where the key matches the <samp>ID</samp>, and the value is a model with the fields below.
 
The <samp>Data/AudioChanges</samp> asset consists of a string → model lookup, where the key matches the <samp>ID</samp>, and the value is a model with the fields below.
   Line 52: Line 51:  
|}
 
|}
   −
====Example====
+
===Example===
 
This content pack adds a new music cue to the game, and plays it when the player enters the bus stop:
 
This content pack adds a new music cue to the game, and plays it when the player enters the bus stop:
   Line 84: Line 83:  
     ]
 
     ]
 
}</nowiki>|lang=javascript}}
 
}</nowiki>|lang=javascript}}
  −
====Other changes====
  −
* The game no longer crashes when playing audio which doesn't exist. It now logs an error and returns a default quiet click sound instead. (If you use <code>try..catch</code> to check if an audio cue exists, you should check <code>Game1.soundbank.Exists(name)</code> instead.)
      
==Managing audio in Custom Music content packs==
 
==Managing audio in Custom Music content packs==
translators
8,445

edits

Navigation menu