[REL] SoundAPI for GDT

#SoundAPI for GDT

I just wanted to change my music in GDT, and I was too bored to just switch the files which is many times easier, so I wrote a API-like mod that allows other mods to easily change in-game music.

##But… how?
Well, It takes the piece of code that sets all the background music, and wraps easy-to-use functions around it to allow other fellow modders to easily change the music which is playing.
##And how do I use it?
It will add an array with only two functions.

SoundAPI.addMusic(file, stage) //file = Filename/File-location, stage = Required office to be played in. Adds music to the bgm playlist.
Sound.erasePrevious() //Erases all existing background music from the play list.
--- AS OF UPCOMING 0.0.2, SoundAPI.changeTitle WILL BE REPLACED WITH SoundAPI.changeSound(fx, file) //Replaces in-game sounds.

##Downloads:
API - Direct Download
Example Mod - Direct Download
API - Workshop

5 Likes

This is such a suprise! I had no idea you were making this! :open_mouth:

But I told yo- ooh, yes, It was a big secret.

1 Like

Gunna make a music mod now.

It’s called…

Kizza’s crappy dubstep mod

2 Likes

AMAZING! Can I change every sound in the game?

As well as pop ups? Do you have it planned?

Currently only the title music and the background music.
I have seen the possibility for ‘sfx’ to be changed too. Will add that now as I just noticed how easy it was to do. You need to use exact names to change them though.

Obvisously. Upload to the workshop. Can I PM you with a question?

Okay…

Wait, does the music have to be a .ogg?

ogg or (maybe) mp3. The code contains parts about the ability of playing mp3s, but I have never tested that.

Just tried using .mp3’s, did nothing. I’ll convert them to .ogg and try again