Music modding

From Stellaris Wiki
Jump to navigation Jump to search


Outliner top.png
This article is timeless and should be accurate for any version of the game.

Creating a mod that adds music to Stellaris is rather easy. Following this guide, you'll create a mod that is essentially a modular music pack. That is to say, if you create a music pack as described in this guide, then create another, a user could download either or both from the Steam Workshop, install them both concurrently and have all the music that was included in both mods.

Essentially, one music pack does not override the other - you can install multiple over top of one another and so build a whole library of music to listen to in-game.

Getting Started[edit]

Let's take a look at the required folder structure and files. These are the contents of the base game's music folder:


Folder/File Summary
*.ogg A music file.
songs.asset Controls the assignment of music to a code name, and sets the volume of playback.
songs.txt List of the code names mentioned in songs.asset.

We will use this same structure in our mod in order to add foreign music files to the game.

Setting Up[edit]

First of all, follow the step-by-step modding guide to create the folder structure for your mod and enter all the relevant data in the newly-created "YOUR-MOD-NAME-HERE.mod" file.

Once you've done that initial set up, it's time to create the folder structure for your music pack mod.

In quick overview, your created mod's folder will by the end of this guide contain this:

  • a "descriptor.mod" file;
  • a "music" folder containing:
 * music files in .OGG format;
 * a "YOUR-MUSIC-PACK.asset" file;
 * a "YOUR-MUSIC-PACK.txt" file.
  • and finally a "YOUR-MOD-THUMBNAIL.jpg" image for the Steam Workshop.

Mod structure[edit]

So create a folder inside your music pack mod's main folder and call it "music". Add to this folder two files:

  • a "YOUR-MUSIC-PACK.asset" file;
  • a "YOUR-MUSIC-PACK.txt" file.

Call them whatever you like.

However, you generally should not call it "songs.asset" and "songs.txt", because this is the name that Stellaris uses for its own files and doing so might overwrite the base game's settings and songlist.

In order to ensure that no other music packs will overwrite your own songlists, call it something unique like I did for my "shrooblord-musicpack.asset".

Next, put music files in Ogg Vorbis format (.OGG) in this same "music" folder. If you have music files in a different file format, convert them to Ogg Vorbis (44.1 Khz) first. A tool you could use for this is Audacity, which is free.

That's all for the main structure of the mod! Now, let's edit those ".asset" and ".txt" files so that Stellaris actually loads our music pack into the game.

Creating the List of Songs[edit]

To know which file names should be displayed as what song title in-game, Stellaris uses the syntax described below. Follow this same syntax and your music will show up in-game and be automatically played by the music player!


First, let's build the ".asset" file; we'll call it "songlist.asset" for sake of simplicity.

So say I have placed in my "music" folder two songs I want to add to the game. One is called "LemonDemon-DinosaurchestraPartOne.ogg" and the other is "FoolsGarden-LemonTree.ogg". To get them to show up in-game, I have to put the following in the "songlist.asset" file:


music = {
 	name = "Dinosaurchestra - Part One"
 	file = "LemonDemon-DinosaurchestraPartOne.ogg"
 	volume = 0.50

music = {
 	name = "Lemon Tree"
 	file = "FoolsGarden-LemonTree.ogg"
 	volume = 0.50

What are these entries? The first variable "name" is the name that will show up in the Music Player. The "file" variable is the exact filename of the song as it appears in the "music" folder that's in the mod's main folder you created for this music pack mod. "volume" is a relative volume for the music to play at. All music I have encountered always uses "0.50" as a value, but experiment with what works best for your specific songs.


Next, we write the following to the "songlist.txt" file: songlist.txt

song = {
   name = "Dinosaurchestra - Part One"

song = {
   name = "Lemon Tree"

These are simply the same "name" variables as described in the "songlist.asset" file.

In the references I've seen, the order of the songs in both the "songlist.asset" and "songlist.txt" files are identical; I'm not sure if this is crucial, but it's probably best to follow that example.

Tools & utilities[edit]

  • Audacity - Powerful, well-documented and free audio processing program that allows you to, for example, convert between music file types.
  • dir2ogg - For Linux users, a very easy command line tool for converting mp3, m4a, wma, and wav files in bulk into the ogg-vorbis format.
  • soundconverter - Also for Linux users, Soundconverter is a no Terminal based bulk converter for the most common formats into the Stellaris needed ones.

See also[edit]


Empire EmpireEthicsGovernments • Civics • OriginsMandatesAgendasTraditions • Ascension PerksEdictsPoliciesRelicsTechnologiesCustom Empires
Pops JobsFactions
Leaders LeadersLeader Traits
Species SpeciesSpecies Traits
Planets PlanetsPlanetary Feature • Orbital DepositBuildings • DistrictsPlanetary Decisions
Systems SystemsStarbasesMegastructuresBypassesMap
Fleets FleetsShips • Components
Land Warfare ArmiesBombardment Stance
Diplomacy Diplomacy • Federations • Galactic CommunityOpinion ModifiersCasus Belli • War Goals
Events EventsAnomaliesSpecial projectsArchaeological Sites
Gameplay GameplayDefinesResources • Economy
Dynamic modding Dynamic moddingEffectsConditionsScopesModifiersVariablesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam Workshop