mrgreaper Posted January 10, 2014 Share Posted January 10, 2014 Ok this is a video Tutorial to add sounds to your mod. ********************************************************** * The Video * * http://www.youtube.com/watch?v=MTGJXO_2Kks * * * ********************************************************** The text version (not as good as the video) in your dev enviroment your resources folder will be in : root\src\main\resources\assets\modid in that modid folder you need to create a "sounds" folder and a sounds.json file (blank text file will do) lets take the sounds.json file from my video : { "bunnyBegA": {"category": "master","sounds": [{"name": "bunnyBegA","stream": false}]}, "bunnyBegB": {"category": "master","sounds": [{"name": "bunnyBegB","stream": false}]}, "bunnyRelease": {"category": "master","sounds": [{"name": "bunnyRelease","stream": false}]} } now lets break one line down "bunnyBegA": {"catagory": "master","sounds": [{"name": "bunnyBegA","stream": false}]}, #NAME OF FILE MINUS EXTENSION1#: {"catagory": #NAME OF CATEGORY IT BELONGS TO# ,#FOLDER ITS LOCATED IN#: [{"name": #NAME OF FILE MINUS EXTENSION2#,"stream": #IS IT LONG#}]}#COMMA# #NAME OF FILE MINUS EXTENSION1# = if your file is called bunnyBegA.ogg then this is "bunnyBegA.ogg" #NAME OF CATEGORY IT BELONGS TO# = the category of the sound, for the new 1.7.2 volume control (i dont know all the categories but im sure a search of the default json will show you them #FOLDER ITS LOCATED IN# = sounds of course #NAME OF FILE MINUS EXTENSION2# = same as #NAME OF FILE MINUS EXTENSION1# (its possible that the first one can be anything as its the internal name, but you may as well keep it as the files name, there is no reason not to after all #IS IT LONG# =set this to true if its a long sound file, i dont know the impact this has on mc itself so only set to true if it dont play right in false is my advice! #COMMA# = theres more entrys to come.... no comma on the last one! Hope you enjoyed the guide and video Mods : i am trying to put this on the wiki now Quote Link to comment Share on other sites More sharing options...
coolAlias Posted February 14, 2014 Share Posted February 14, 2014 Thanks for this! I was wondering how to go about this. Turns out you can define multiple sounds in one line: "armorbreak": {"category": "player","sounds": ["armorbreak1", "armorbreak2", "armorbreak3", "armorbreak4"]} and then play them with just the registered string to get a randomized sound from within. Lots of cool stuff to learn in the vanilla sounds.json file. Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
GotoLink Posted February 14, 2014 Share Posted February 14, 2014 Along with "stream" flag and "name" string, there is a "type" enum. Default is "type": "file", which loads *.ogg file. Use "type": "event" to load any other (you need to precise the file extension then). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.