Jump to content

Custom Music/Sound Woes


Niipaa

Recommended Posts

Howdy yall. So I'm trying to create a sort of multi-faceted mod, that focuses on changing sounds, music, ui etc etc. And while I've made some successes by reading up on tutorials and changes to folder structure, I simply cannot get the sounds or music to play from MODNAME/media/sounds or MODNAME/media/music.

 

I've tried a few things, the first and foremost was leaving the file names as they are in default PZ, and can confirm that the prompt that follows with launching PZ told me that my .oggs and .wavs were indeed overriding the defaults. However upon launch, everything was still default. This goes for both music and sound.

 

My next attempt focused solely on music, by grabbing the client/Music/MusicChoices.lua, and creating a copy in my MODNAME/media/lua/client/Music/MusicChoices.lua. I then went about changing the names in there, and the names of my files, which only exacerbated the problem by throwing out a bunch of Java.file not found errors. I can only assume that currently in the latest IWBUMS build, that the game only looks in the default directory now?

 

I even tried RoboMat's SilentMusic mod just to see, and that doesn't work either. I understand that mod may have not been updated recently, nor supporting the IWBUMS build, and I understand that that particular build comes with it's own disclaimer. But everything else in my mod, UI, Corpse Removal, heck, even custom named sounds called by the way of

self.sound = getSoundManager():PlayWorldSound

seems to work. It's just overriding default sounds, or renaming music choices that doesn't seem to work. Am I missing something, are there more files I need to copy and adjust? Has something changed in the latest IWBUMS build? Any insight is greatly appreciated, as I would love to continue work on this without having to overwrite default PZ files manually.

Link to comment
Share on other sites

Well I guess that the modloader simply doesn't handle overwriting of default sounds yet. Might be something to poke the devs about though ;)


EDIT: Actually ... I take that back since my Silent Music mod used the ModLoader too (thought it was still using the brute force method of copying over the base files) :D

 

Then something got broken somewhere along the way - maybe by introducing the sound options in one of the recent builds.


You should open a new ticket in the bug tracker:

 

http://theindiestone.com/forums/index.php/tracker/

Link to comment
Share on other sites

Thanks for the fast response RoboMat, and I posted the issue, linking back here in case I missed anything in it. Hopefully some more light can be shed on this, I'd even take a work around at this point, that isn't just overwriting old files, because that's not really a solution. Though it looks as though for the time being, it might be my only option.

Link to comment
Share on other sites

  • 2 months later...

I just had a play around with adding music, and I'm not sure if this is known - I expect it is, people are clever ;) - but here's one way to add custom music, just not with as much modularity as...a mod.  I've only tried with .ogg format since that's what everything else was.

 

Your new music file goes in the media/music/luatriggered folder.

 

Edit the MusicChoices.lua in media/lua/client/Music to include your new file

e.g.

        {            file="PZ",            scores = {                drama = 5,                bias = 7,            }        },		{            file="your_new_music",            scores = {                drama = 5,                bias = 7,            }        },

I especially liked the "PZ" track and the situations it played in.  So I used that as a basis for the new one.  I increased the bias, I assume that means it will play more often.

 

I don't know the affects of the various drama numbers, other than assuming higher is when things are getting..exciting..so the only issue here is knowing what values to use to get your music to play in the situations you want it to.  My additions are for calmer, I'm-walking-around-isn't-this-forest-nice moments :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...