Loading...
  OR  Zero-K Name:    Password:   

How do I add more music?

11 posts, 1629 views
Post comment
Filter:    Player:  
sort

7 years ago
I want to add more music to my local copy of the game. I want to add more chiptunes because it keeps me breathing in a good rhythm. I believe I asked this question Discord and tried the solution but somehow I screwed up the simple instruction. Maybe I will understand the instruction this time. If something weird happens I can respond to this thread.
+0 / -0


7 years ago
Is there a reason not to run your favorite music player alongside zk?
+0 / -0
Keep in mind music currently has to be in .ogg format. Go to your Spring folder (if you don't know where it is, you can access it through lobby, the path is something like help -> reports -> open data folder or somesuch).

Basic way:

  • Go to `sounds` folder (create if does not yet exist; applies below too).
  • Inside that folder there can be up to 5 folders for various ingame situations: "war", "peace", "victory", "defeat", "briefing". Add the music files to the categories you want the music to play in (if you want a song to play anytime you would need to create a copy in each).
  • You might want to deselect `Settings/Audio/Use included tracks` ingame setting if you dont want the builtin music.

Advanced way (if you want a song to play in multiple situations but dont want extra copies in each folder):

  • place the music anywhere in the Spring folder.
  • create `sounds/music/playlist.lua` which has the following format:
return {
    peace = {
      "path/to/your/file/relative/to/spring.ogg",
      "some/other/file.ogg"
    },
    war = {
      -- etc
    },
    -- etc
}

  • this overrides everything else so you'd need to place builtin tracks in that config manually if you want them. See here for their names (there are currently no "briefing" tracks; there is a "loading" category which is never used at the moment).
+6 / -0
7 years ago
Can the music also be in the lossless FLAC format? It's open-source, too, and you don't lose any quality, unlike the lossy OGG. The only downside is that the file sizes are larger.
+0 / -0


7 years ago
Nope.
+0 / -0
Being pedantic, ogg is a container format that can use different encoders for the audio layer, which include vorbis, flac, and pcm among others.

Spring, however, only supports Ogg Vorbis.
+0 / -0
There is actually a prepackaged alternate soundtrack already done by Forboding Angel here: https://springfiles.com/spring/games/ota-music

It's in the format Sprung describes, Just put the war and peace folders in ZeroK/sounds/music/

Edit: There is also https://springfiles.com/spring/lua-scripts/techno-music-player but I haven't tried it
+0 / -0
Bump. Is it possible to use this method to replace the main menu music in chobby?

Also, loading music. I remember it existed briefly, now it doesn't seem to be anywhere in music widget. Is the code for that just turned off or completely ripped out now?

I'm currently using the knowledge from this thread to compile a replacement soundtrack for ZK. I have all my legal ducks in a row now with participating artists and it's nearly complete, just waiting for some technical fixes coming out next zk stable.

+0 / -0


7 years ago
I could add the same functionality for main menu music.
+0 / -0


7 years ago
It would be a nice bonus but I don't consider it important. I'd bet most people turn off the main menu music anyways.
+1 / -0
6 years ago
CArankTheMooseIsLoose: Then I'd be an exception, since I also enjoy listening to music when I'm thinking about which games to set up (or when I'm waiting in the lobby). With that in mind, and since I tried to add in custom music for the menu, with no apparent success, I'd appreciate it if someone like AUrankAdminGoogleFrog were to add in the feature, which I'd imagine would be very minor compared to what other major features were being worked on at this time (such as the Planet Wars).
+0 / -0