Adding Own Music Mini-Tutorial (no modding skills required)
So, after downloading the different music mods around here I kinda figured out how they worked, and it was so simple that I figured I should try to add some of my own favourite songs to the game - and, surprisingly, it worked! This made me realise that modding the music in this game is something anyone can do (I'm not particularily tech-savvy), so, I thought, why not share the method.
It's possible many of you already know how to do this, or that someone else posted this somewhere else, but the worst that could happen in such a case is that I wasted my time, so why not.
Right, mini-tutorial:
1) Start by finding the main folder for Crusader Kings II. There are two folders, the one where most of the game is stored and the one that has save data and such. You want the former. In my case, it was located in C:\Program Files (x86)\Steam\Steamapps\common\crusader kings ii, although the precise location might vary. The folder should contain several sub-folders, like "achievements", "DLC", "launcher", and the one we want, "music".
2) Open the "music" sub-folder. You will see a number of files with the .ogg-extension, like "akingisdead.ogg", "asimplesongforcommoners.ogg", "coeurdelion.ogg" and several others. You will also see a .txt-file, called "songs.txt". I'd recommend you back up the "songs.txt"-file - it's not crucial that you do so, but there's a chance it might be useful if something goes wrong later. Also, I would probably change the name of the "songs.txt"-file that remained in your "music"-folder (to anything you want, it doesn't matter what it's named, although I'd use only lowercase letters and numbers, no symbols or space; haven't tested it, but doing so might mess with the programming), so you won't run any risk of files overwriting each other later.
3) Find some song you want to use in the game from your reportoire of music. Seeing as all the files for the game are in .ogg-format, though, it's probably best to convert your file to .ogg before you try using it. Fortunately, this is easy, as there are many converters out there. You could use google and search for "convert to .ogg" as I did, or you could, for example, use this site: http://audio.online-convert.com/convert-to-ogg (I used that one myself, but I will make no guarantees about how safe it is, though it worked fine for me).
4) Take your newly converted .ogg-file and put it into the "music"-subfolder from earlier. Again, I note that it is probably safest to change its name to something consisting of only lowercase letters and numbers, no spaces or funny symbols; I don't know for sure that doing so would be a problem, but it pays to be safe I guess.
5) Open the .txt-file. You will note that it looks something like this:
and so on. Each of the "song = ... name = ..." and so ons represent an instruction to play one song. The simplest thing to do is simply to copy one of these blocks of text. You want to copy everything from "song" to the last of the three "}"'s at the end. Then, just swap the song name you copied with the name of the song you want to add (leaving it with an .ogg-extension).
An example - say you were adding a song originally named "Crusader's Paradox", a MP3-file (no such song exists AFAIK, I just needed some name ). After converting it to .ogg, change it's name to "crusadersparadox", making sure it has an .ogg-extension. Then edit the .txt-file as I said, getting a result like this
If this was the entire .txt-file at this point, then when you play Crusader Kings, the game will play the three songs "asimplesongforcommoners", "akingisdead" and "crusadersparadox" in a random loop, each popping up equally often statistically speaking. Obviously, as there are more songs on the list, you'd get all of them, as well as your new song, and you are now ready to enjoy Crusader Kings with your own custom soundtrack! Enjoy!
I guess I can add a few "advanced" points as well, for those who want to tweak a bit:
There's nothing wrong with having multiple .txt-files, so you could, say, make a separate .txt-file for each song or group of songs if so inclined. The game will still choose randomly from all the .txt-files, so you won't "lose any songs" this way. I think I read somewhere that the game will go through the different .txt-files in alphabetic order (though shuffling the contents within each one), but this doesn't seem to be the case for me - anyone got a comment?
The "chance = { modifier = { factor = 1 (...)"-part can be tweaked to change how often a particular song crops up. If for some reason you don't want a song to play at all, change "1" to "0". If you want it to play twice as often as other songs, change "1" to "2"; if you want it three times as often, "1" to "3" and so on. The number should be an integer; I don't believe the coding accepts fractions (so you couldn't get it to play, say, half as often as other songs, although you could change the factor of all other songs to 2 and leave that one song's factor as 1), but I might be mistaken. Hey, I'm no computer expert, I don't run the risk of crashing my pc/game and then being unable to fix it! o
You can tweak the code even further, although now we're kinda in modding terrain. It's possible to get it to play only when you have a certain culture, a certain religion, if you're at war or at peace and so on. I haven't really toyed so much with this, but, say, if you wanted the aforementioned "crusadersparadox.ogg" to only play when you're at war, then its code would have to look something like this:
The song now has a 0 chance of being played while you're not at war (i.e. it will never play when at peace), and will play equally often as other songs when you are at war.
Well, that's about it. Those with the skills to tweak this further are free to do so, and it would be nice if you shared your results with the rest of us.
Hope that this might be slightly useful, and, if someone already made a better guide somewhere, then I defer to them and apologise for the disturbance.
Anyhow, go and enjoy Crusader Kings with your new soundtrack!
As a final note, personally, I found some pieces from the anime Horizon in the Middle of Nowhere to fit shockingly well with the game, but that might just be my opinion.o
So, after downloading the different music mods around here I kinda figured out how they worked, and it was so simple that I figured I should try to add some of my own favourite songs to the game - and, surprisingly, it worked! This made me realise that modding the music in this game is something anyone can do (I'm not particularily tech-savvy), so, I thought, why not share the method.
It's possible many of you already know how to do this, or that someone else posted this somewhere else, but the worst that could happen in such a case is that I wasted my time, so why not.
Right, mini-tutorial:
1) Start by finding the main folder for Crusader Kings II. There are two folders, the one where most of the game is stored and the one that has save data and such. You want the former. In my case, it was located in C:\Program Files (x86)\Steam\Steamapps\common\crusader kings ii, although the precise location might vary. The folder should contain several sub-folders, like "achievements", "DLC", "launcher", and the one we want, "music".
2) Open the "music" sub-folder. You will see a number of files with the .ogg-extension, like "akingisdead.ogg", "asimplesongforcommoners.ogg", "coeurdelion.ogg" and several others. You will also see a .txt-file, called "songs.txt". I'd recommend you back up the "songs.txt"-file - it's not crucial that you do so, but there's a chance it might be useful if something goes wrong later. Also, I would probably change the name of the "songs.txt"-file that remained in your "music"-folder (to anything you want, it doesn't matter what it's named, although I'd use only lowercase letters and numbers, no symbols or space; haven't tested it, but doing so might mess with the programming), so you won't run any risk of files overwriting each other later.
3) Find some song you want to use in the game from your reportoire of music. Seeing as all the files for the game are in .ogg-format, though, it's probably best to convert your file to .ogg before you try using it. Fortunately, this is easy, as there are many converters out there. You could use google and search for "convert to .ogg" as I did, or you could, for example, use this site: http://audio.online-convert.com/convert-to-ogg (I used that one myself, but I will make no guarantees about how safe it is, though it worked fine for me).
4) Take your newly converted .ogg-file and put it into the "music"-subfolder from earlier. Again, I note that it is probably safest to change its name to something consisting of only lowercase letters and numbers, no spaces or funny symbols; I don't know for sure that doing so would be a problem, but it pays to be safe I guess.
5) Open the .txt-file. You will note that it looks something like this:
Code:
[COLOR="#FFFFFF"]song = {
name = "akingisdead.ogg"
chance = {
modifier = {
factor = 1
}
}
}
song = {
name = "asimplesongforcommoners.ogg"
chance = {
modifier = {
factor = 1
}
}
}[/COLOR]
and so on. Each of the "song = ... name = ..." and so ons represent an instruction to play one song. The simplest thing to do is simply to copy one of these blocks of text. You want to copy everything from "song" to the last of the three "}"'s at the end. Then, just swap the song name you copied with the name of the song you want to add (leaving it with an .ogg-extension).
An example - say you were adding a song originally named "Crusader's Paradox", a MP3-file (no such song exists AFAIK, I just needed some name ). After converting it to .ogg, change it's name to "crusadersparadox", making sure it has an .ogg-extension. Then edit the .txt-file as I said, getting a result like this
Code:
[COLOR="#FFFFFF"]song = {
name = "akingisdead.ogg"
chance = {
modifier = {
factor = 1
}
}
}
song = {
name = "asimplesongforcommoners.ogg"
chance = {
modifier = {
factor = 1
}
}
}
song = {
name = "crusadersparadox.ogg"
chance = {
modifier = {
factor = 1
}
}
}[/COLOR]
If this was the entire .txt-file at this point, then when you play Crusader Kings, the game will play the three songs "asimplesongforcommoners", "akingisdead" and "crusadersparadox" in a random loop, each popping up equally often statistically speaking. Obviously, as there are more songs on the list, you'd get all of them, as well as your new song, and you are now ready to enjoy Crusader Kings with your own custom soundtrack! Enjoy!
I guess I can add a few "advanced" points as well, for those who want to tweak a bit:
There's nothing wrong with having multiple .txt-files, so you could, say, make a separate .txt-file for each song or group of songs if so inclined. The game will still choose randomly from all the .txt-files, so you won't "lose any songs" this way. I think I read somewhere that the game will go through the different .txt-files in alphabetic order (though shuffling the contents within each one), but this doesn't seem to be the case for me - anyone got a comment?
The "chance = { modifier = { factor = 1 (...)"-part can be tweaked to change how often a particular song crops up. If for some reason you don't want a song to play at all, change "1" to "0". If you want it to play twice as often as other songs, change "1" to "2"; if you want it three times as often, "1" to "3" and so on. The number should be an integer; I don't believe the coding accepts fractions (so you couldn't get it to play, say, half as often as other songs, although you could change the factor of all other songs to 2 and leave that one song's factor as 1), but I might be mistaken. Hey, I'm no computer expert, I don't run the risk of crashing my pc/game and then being unable to fix it! o
You can tweak the code even further, although now we're kinda in modding terrain. It's possible to get it to play only when you have a certain culture, a certain religion, if you're at war or at peace and so on. I haven't really toyed so much with this, but, say, if you wanted the aforementioned "crusadersparadox.ogg" to only play when you're at war, then its code would have to look something like this:
Code:
[COLOR="#FFFFFF"]song = {
name = "crusadersparadox.ogg"
chance = {
modifier = {
factor = 0
war = no
}
modifier = {
factor = 1
war = yes
}
}
}[/COLOR]
The song now has a 0 chance of being played while you're not at war (i.e. it will never play when at peace), and will play equally often as other songs when you are at war.
Well, that's about it. Those with the skills to tweak this further are free to do so, and it would be nice if you shared your results with the rest of us.
Hope that this might be slightly useful, and, if someone already made a better guide somewhere, then I defer to them and apologise for the disturbance.
Anyhow, go and enjoy Crusader Kings with your new soundtrack!
As a final note, personally, I found some pieces from the anime Horizon in the Middle of Nowhere to fit shockingly well with the game, but that might just be my opinion.o
Last edited: