Skip to content

Create a music pack

rumangerst edited this page Oct 20, 2017 · 19 revisions

Important note

I am not responsible if you upload copyrighted material or something else that will get you into trouble. I am only offering an interface for other modders who want to create music packs. Check if you are allowed to upload your content!


NEW: CSL Music Mod Station Editor

You can now use a tool to create or edit radio stations. Download it here. Also see the more straight forward and simple documentation of the new tool that covers creating a new station & a music pack.


Example packs

If you want an example, I uploaded the two example packs I made here on GitHub. Download is available here.

Creating a music pack (manually)

CSL Music Mod will look for mods that provide additional radio station. You can easily create your own music packs and upload them to Steam Workshop (But be careful what you upload. I'm not responsible if something happens with your account or your mod gets removed!).

You can use a pre-made template to create your music pack. It will make some things easier if you are not very experienced with modding. You can find the template here. This file contains the content of this directory.

First, unpack the template into some work directory and re-name the folder to how you want to name your music pack.

Extracted template

Editing the source files

  1. Go to Source folder and open Mod.cs with Notepad or any other editor that is suitable (I recommend Notepad++ if you use Windows)
  2. Replace <MyMusicPack_Techname> by the name of your pack (This must not contain any spaces). Example: Epic_Soundtrack
  3. Replace <My Music Pack> by the "real" name of your pack (This one can contain spaces).. Example: Epic Soundtrack
  4. Replace <YourUser> by your user name

Note: You have to replace the text including the angle brackets. If you leave the angle brackets you'll get an error

Example

using System;
using ICities;
using UnityEngine;
using System.Collections;
using System.IO;

namespace CSLMusicPack_rumangerst_MyMusicPack
{
    public class CSLMusicPack : IUserMod
    {
        public string Name
        {
            get
            {
                return "Music pack: My Music Pack";
            }
        }

        public string Description
        {
            get
            {
                return "Add more music to the game. Needs CSLMusicMod";
            }
        }
    }
}

Adding your music

CSLMusicMod can only load *.ogg files. If you don't know how to convert your music, you can find a tutorial here.

Your mod needs a folder with the name CSLMusicMod_Music that contains all music files. The same procedure as adding your own stations apply here. Just follow this guide. Always remember that all those guides are working in the CSLMusicMod_Music folder of your music pack.

Install mod locally

To test if your mod works fine, you can install it manually. If you want to do test it, do following:

Note: I am refering to this documentation

Open the folder where Cities: Skylines stores its locally installed mods:

  • On Windows %LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods
  • On Mac /Users/**username**/Library/Application Support/Colossal Order/Cities_Skylines/Addons/Mods
  • On Linux ~/.local/share/Colossal Order/Cities_Skylines/Addons/Mods

Copy your whole music pack folder whole folder into this mod directory.

Extracted template

For example, now there is a folder .../Addons/Mods/My_Epic_Music/CSLMusicMod_Music

Publishing your mod

Install your mod locally and open Cities: Skylines. In the content manager, you can find a button to share your mod. Don't forget to make a thumbnail and a description.

Troubleshooting

If you install your pack locally, the music could not appear on the list. This happens, because the mod has no real ID and CSL Music Mod cannot 'trace back' the files.

There is no real solution. You could try to test your music by putting it into the default folder and upload your mod to the workshop. Set the visibility to 'hidden' until you downloaded and tested your mod.

Test and publish

Don't forget to test your mod and publish it to Steam Workshop.

Clone this wiki locally