Changes

Jump to navigation Jump to search
1,007 bytes added ,  20:17, 1 December 2021
Added patch syntax section in custom music
Line 62: Line 62:  
The <samp>content.json</samp> file you made tells Custom Music what audio to change.
 
The <samp>content.json</samp> file you made tells Custom Music what audio to change.
   −
You can list any number of patches in the <samp>Music</samp> field, each surrounded by <code>{</code> and <code>}</code>. See the next section for more info, but here's a quick example:
+
You can list any number of patches in the <samp>Music</samp> field, each surrounded by <code>{</code> and <code>}</code>. Here's a quick example:
    
{{#tag:syntaxhighlight|
 
{{#tag:syntaxhighlight|
Line 72: Line 72:  
             "Loop": false,
 
             "Loop": false,
 
             "Ambient": false
 
             "Ambient": false
 +
        },
 +
        {
 +
            "Id": "Hospital_Ambient",
 +
            "File": "assets/hospitalMachineryLoop.ogg",
 +
            "Loop": true,
 +
            "Ambient": true
 
         }
 
         }
 
     ]
 
     ]
 
}|lang=javascript}}
 
}|lang=javascript}}
 +
 +
====Patch syntax====
 +
 +
{| class="wikitable"
 +
|+
 +
|-
 +
! Parameter !! Description !! Example
 +
|-
 +
| <code>Id</code> || Corresponds to the track ID in game, as listed on the track list. || <code>MainTheme</code>
 +
|-
 +
| <code>File</code> || The file path, starting from the root of your mod's filepath. || <code>assets/themeSong.ogg</code>
 +
|-
 +
| <code>Loop</code> || Sets whether the track will loop on its own. || <code>false</code>
 +
|-
 +
| <code>Ambient</code> || Sets whether the track is an ambient track or not. If you're replacing an ambient track, or adding an ambient track to a map, set this to true. || <code>false</code>
 +
|}
 +
 +
Note that ambient tracks are specifically for tracks that play background ambience, such as wind, machinery whirring or rain, and are categorized separately from music in the game code.
 +
For any music, make sure to set this parameter to <code>false</code>.
    
==Managing audio in SMAPI==
 
==Managing audio in SMAPI==
41

edits

Navigation menu