Changes

977 bytes added ,  03:18, 20 October 2021
Added adding audio and content format section
Line 38: Line 38:  
<ol>
 
<ol>
 
<li>Install [https://smapi.io/ SMAPI] and {{nexus mod|3043|Custom Music}}.</li>
 
<li>Install [https://smapi.io/ SMAPI] and {{nexus mod|3043|Custom Music}}.</li>
<li>If desired, [[#Soundbank files|extract the soundbank]] to listen to the in game sounds.</li>
+
<li>If desired, [[#Soundbank files|extract the soundbank]] to browse through and listen to the in-game sounds.</li>
 
<li>[[Modding:Content packs#Create a content pack|Create a SMAPI content pack per step 3 of the general Create a Content Pack page]].</li>
 
<li>[[Modding:Content packs#Create a content pack|Create a SMAPI content pack per step 3 of the general Create a Content Pack page]].</li>
 
<li>Create a <tt>content.json</tt> file in the same folder with this content:</li>
 
<li>Create a <tt>content.json</tt> file in the same folder with this content:</li>
   
{{#tag:syntaxhighlight|
 
{{#tag:syntaxhighlight|
 
{
 
{
Line 47: Line 46:  
     ]
 
     ]
 
}|lang=javascript}}
 
}|lang=javascript}}
   
<li>Launch the game.</li>
 
<li>Launch the game.</li>
 
</ol>
 
</ol>
    
If you did everything correctly so far, you should see the new mod under "Loaded X content packs" in the SMAPI console. (If not, review the above steps or [[Modding:Community|ask for help]].)
 
If you did everything correctly so far, you should see the new mod under "Loaded X content packs" in the SMAPI console. (If not, review the above steps or [[Modding:Community|ask for help]].)
 +
 +
====Audio file format====
 +
 +
Custom Music only supports <tt>.ogg</tt> & <tt>.wav</tt> formats. If you have <tt>.mp3</tt> files you'd like to use in-game, you can convert the audio file to <tt>.ogg</tt> with audio software such as [https://www.audacityteam.org/ Audacity].
 +
 +
Make sure the file size of your music is relatively small (preferably less than 4MB). The bigger the file, the longer the game will freeze for when loading your newly added song.
 +
 +
====Content format====
 +
 +
The <tt>content.json</tt> file you made tells Custom Music what audio to change.
 +
 +
You can list any number of patches in the <tt>Music</tt> field, each surrounded by <code>{</code> and <code>}</code>. See the next section for more info, but here's a quick example:
 +
 +
{{#tag:syntaxhighlight|
 +
{
 +
    "Music" : [
 +
        {
 +
            "Id": "MainTheme",
 +
            "File": "assets/themeSong.ogg",
 +
            "Loop": false,
 +
            "Ambient": false
 +
        }
 +
    ]
 +
}|lang=javascript}}
    
==Managing audio in SMAPI==
 
==Managing audio in SMAPI==
41

edits