Music.json

**Music.json** is a file in the game that determines which music files play in what location of the game. It does this through a list of names representing areas in the game and giving it a directory to the music file. These directories can be edited for those looking to make Content Packs. The music.json file is located in **phase\_3\_audio.mf**.

## Content Packs

To edit the music.json, first locate it in the game's resource files. You can do this by opening the Corporate Clash launcher, clicking the gear icon at the bottom, and selecting "**Show/open game directory folder**."

Next, extract **phase\_3\_audio.mf**, which can be done by right clicking on the file and selecting "**Extract here**" from the pop-up menu. Panda3D (the games engine) must be installed for this to work. Alternatively, you can open a terminal (entering **cmd** into the address bar of the folder for Windows users), setting the directory to the resources folder, and running: `multify -x -f phase_3_audio.mf`

To edit the music.json, open the file with a text editor and replace the audio file directories of your choosing.

When creating and packaging a content pack, this file must be put in a folder named **audio** under the root directory.
The folder structure for a content pack should look as follows:

	+ `**audio**`
		- `**music.json**`
	+ `phase\_3`
		- `audio`
			* `bgm`
			* `sfx`
		- `maps`
	+ `phase\_3.5`
		- `audio`
			* `bgm`
			* `sfx`
		- `maps`
	+ `phase\_4`
		- `audio`
			* `bgm`
			* `sfx`
		- `maps`
	+ *`(etc.)`*

When using this file structure, the content pack creator will enter the *PackFolder*, open their terminal of choice, set the directory to the folder the content pack is located, and run:

`multify -c -f *ContentPackNameHere*.mf audio phase_3 phase_3.5 phase_4 *(etc.)*`

The music.json accepts **ogg**, **wav**, and **mp3** audio files.

## Contents of music.json

The music.json's contents are separated into 4 different sections: default, halloween, christmas, and april-fools. The default section defines music that is loaded by default, with the latter three replacing specific instances of music during their respective Holiday event.

### Default

The default section is the first loaded section, and will always be loaded no matter what.

### Halloween

The music specified in the halloween section overwrites what is inputted in the *default* section during Halloween events.

### Christmas

The music specified in the christmas section overwrites what is inputted in the *default* section during Toonsmas events.

 main\_theme
 toontown\_central\_sz
 donalds\_dock\_sz
 olde\_toontown\_sz
 daisys\_garden\_sz
 minnies\_melody\_land\_sz
 the\_burrrgh\_sz
 outdoor\_zone\_sz
 donalds\_dreamland\_sz

### April-Fools

The music specified in the april-fools section overwrites what is inputted in the *default* section during April Toons events.

 main\_theme

## Version History

v1.3.0 BETA
* Music.json now supports new functionality for specific manager themes inside of each facility type.
	+ For example, the Mint Supervisor inside of a Coin Mint and inside of a Bullion Mint can have two different themes set via Music.json keys.

v1.2.8.2 BETA
* Fixed an issue where the Overclocked Find The Foreman's music.json definition was listed twice.

v1.2.6.1 BETA
* Content Pack creators can now use waveform (\*.wav) or \*.mp3 music files in content packs, as long as they update their music.json file respectively.

v1.2.0.4 BETA
* Fixed an issue that would cause the C.L.O. and Overclocked C.L.O. battles to use the wrong music.json keys during the epilogue.

v1.1.4.1 BETA
* Fixed an issue where audio content packs utilizing `music.json` would cause crashes between zones if the music path was set to `None`.
* Fixed an issue where audio content packs required `audio/music.json` to be in a folder of the same name of the pack, within the pack.
	+ The audio folder containing music.json should now be placed in the root folder, such that your content pack has an audio folder alongside all the phase folders.

v1.1.4 BETA
* the music.json was added.
* ALL music in the game has been converted to a json-based load system!
	+ Content pack creators can access this system by creating a "music.json" file in the audio folder of their content pack. (Contentpack/audio. NOT in a phase folder within the content pack, but instead at the root. You can reference music.json in phase\_3\_audio/audio of the download files.)
	+ Custom music can be loaded that is not originally present in the base game. Just leave the music within the same folder as music.json in your content pack, and you can reference it that way.
	+ Only music that is changed should be overridden to allow for maximum compatibility with other packs.
	+ Music can also be picked from at random from a list of provided choices, just include the music filepaths in list format! (Square brackets, such as ["audio/testSong1.ogg", "audio/testSong2.ogg"])
	+ Instances in which music is repeated (such as between streets, building interiors, cutscenes, etc.) are completely separated from each other.
		- For instance, the battle music on Wacky Way could be entirely different from the battle music on Loopy Lane!
	+ Songs can also be defined per holiday, allowing for content pack creators to have festive tracks swap out whenever a holiday begins in Toontown!

## Trivia

* Many of the Neighborhoods use their *Toontown Online* names instead of their Corporate Clash names in the code.
* The Trolley Games Treasure Dive and Toon Slingshot have their audio file names swapped.