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

How do I add more music?

9 posts, 238 views
Post comment
Filter:    Player:  
sort


USrankOflameo
36 days 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


RUrankAdminikinz
36 days ago
Is there a reason not to run your favorite music player alongside zk?
+0 / -0


PLrankAdminSprung
36 days ago
(edited 35 days ago)

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).

+4 / -0

PLranksomot
27 days 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



AUrankAdminGoogleFrog
27 days ago
Nope.
+0 / -0



EErankAdminAnarchid
27 days ago
(edited 27 days ago)

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



CArankTheMooseIsLoose
24 days ago
(edited 24 days ago)

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



CArankTheMooseIsLoose
21 hours ago
(edited 20 hours ago)

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



AUrankAdminGoogleFrog
12 hours ago
I could add the same functionality for main menu music.
+0 / -0