Sound Effects - MickeyUK/smash-soda GitHub Wiki

Adding custom sound effects

*For future reference all sound effects used must be in a .wav file format (this wiki page is still work in progress, so bare with me)

start off by going to your build folder and create a sub-folder named custom (for instance, x64/Release/sfx/custom).
In that folder, put all of your custom sound effects you would like to use in that folder

Copy the file _sfx-sample.json from the previous directory and paste it to the custom folder you created before renaming the file to "_sfx.json"

Open that file in notepad (right click file, open with, notepad/choose another app - notepad) Or with any .json file editor of your preference

Each of the sepereate sound effects added would look something like this:

{
  "tag": "wow",
  "path": "wow.wav",
  "cooldown": 5
},

Copy and paste the code after the last } bracket (but do not paste it after the [ bracket or before the ] brackets as it would not be recognised by the code) and edit the code to fit the sound effect you would like to add

  • First line (Tag) is for the command tag (for example: !wow, !yoink)
  • Second line is the path to the file. For this use the file name of the sound you want to use with the .wav extension part of the name
  • Last line is for the cooldown, this is for how long a user has to wait before the sound effect can be used again (this is measured in seconds)

Save the file after editing and the sound effects should be able to be used

User entering and exiting room

Luckily this doesn't require any tedious code editing (now you know the true pain of MickeyUK's suffering)

In the SFX folder (outside the custom folder) place your sound effect files and reame the files to these name exactly:

"new_guest" - For guests entering the room "guest_leave" - For guests leaving