Jump to content

Sound API For Individual Sound Control In-Game


WolfLeader116

Recommended Posts

INTRODUCTION:

Hello,

I think that rather than playing a sound directly in the world, all sounds should first be run through an API so that players can change the individual sound volumes for mods rather than having to use the master volume.

 


HOW:

There can be a "Mods" button in the Minecraft sounds options or a Mod Sounds button in the options. When clicked, a list of all mods will come up. If a mod has specified no sound/volume "groups" or sliders in either the mcmod.info file or a similar, new, sounds file, then the mod will only have a master volume slider when clicked in the list. This menu similar to the Mod Options. When the mod plays a sound, it must play to an API instead as the old method will be deprecated and removed at a later date. The API will get the sound options set by the user and will either play the sound under master volume if no volume group is set, or, in an optional string in the method, the volume group's name can be specified and the API will play the sound under that group instead. All groups, including mod master volumes will be affected by the regular, Minecraft, master volume slider as well. When a sound is played under a group, the API will simply get the percentage of the slider, and apply it to the sound inputted by the mod and then play that sound to the world as normal.

 

The API may be a method of world as before.

 


EXAMPLE:

[spoiler=Play Sound Method (Mekanism)]

world.playSoundAtEntity(player, "mekanism:sound", 1.0F, 1.0F, "mekanismCore:machines");

 

 

[spoiler=mcmod.info (MekanismCore)]

{
  "modListVersion": 2,
  "modList": [{
    "modid": "mekanismCore",
    "name": "MekanismCore",
    "description": "Stuff.",
    "version": "2.6.131",
    "mcversion": "1.9",
    "url": "http://www.google.com",
    "updateUrl": "",
    "authorList": [ "Author"],
    "credits": "Author",
    "logoFile": "/logo.png",
    "screenshots": [ "screenshot.png"],
    "parent": "mekanismCore",
    "requiredMods": [ "Forge", "mekanismCore" ],
    "dependencies": [ "mekanismCore" ],
    "dependants": [],
    "useDependencyInformation": true
  }],
  "volumeSlidersVersion": 1,
  "volumeSliders": [
    "machines",
    "pipes",
    "animals",
  ]
}

 

 

 


OTHER INFORMATION:

Also, the API can get the current values of the default minecraft sliders and play to those or another mod's sliders as specified. The volume format should be "mod:volumeName" so if you wanted to use Minecraft's, you could use "Minecraft:blocks" or another slider name.

 


WHY I DON'T DO THIS ON MY OWN:

Why I don't make anything like this on my own? I never really coded with Forge much before so I don't understand how it works pretty much at all... Also, I do not have very much excess time to work on this. I am already coding several Bukkit plugins to teach myself Java. I am soon going to do a complete rewrite which will take lots of time, but make the plugins much better and hopefully I will then be able to learn Forge. I also have school work to do and other important things to do in life.

 

I believe that much code already written can be reused effectively from the mod options to create the presentation to the players, and the multipliers should be relatively simple to implement. Due to Minecraft 1.9 arriving soon, this feature can be implemented then to allow for less breakage of mods as many mods will be rewritten or changed severely to cope with the update.

 


CLOSING:

Thank you for taking time to read this. I hope this can be done as it will make the gameplay experience much better as you will be able to have much more control over sounds. If you would like any clarification, please ask as I would be happy to see this happen. Thank you again and have a nice day!

Link to comment
Share on other sites

Mods can already play sounds and can already have config options {it would definitely not be in mcmod.info}.

The only thing you're suggestion is to special case the config guis for this specific entry...

Which personally I think is kinda dumb but I can see the point. One central area.

However modders can already extend the sound gui to contain their sounds. So... This really isn't needed, modders can do everything already.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Hm I see what you mean. I think the problem with it is that the modders don't do it so often you are stuck with a mod forcing you to either turn off your sound or listen to it's really annoyingly loud sounds that can't be changed. I've had this problem many times before and so have others. I feel like it would be nice to at least have a requirement/suggestion to make it configurable in some way. An example of a mod I and others have had problems with was Mekanism which is why it was an example. I'd prefer for it's sounds to be much quieter, but I haven't found anywhere to do so without changing the master volume which then makes everything else too quiet... I then have the problem where I can't really do much about it which is what lead me to wanting a solution as I described earlier.

Link to comment
Share on other sites

There is no way we can 'Force' this.

You and the other mod users have to yell at the mod author to give you that config option.

Nothing we can do on our end but make it somewhat easier for the modder, but from what I just looked at, it should be fairly simple.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.