Custom Sounds API Confusion?

  • Alright, been meaning to try this that I finally want to give it a whirl. Well, that is if it's easy and doesn't require a higher level of scripting. I recall Red51 released an API related thing that you could trigger custom sounds to play that I would love to be able to get some sort of "mechanism" in the game to trigger these sounds that it be neat to have custom music playing. If not physical, then I would at least designate areas in where it would trigger, or so I read you could trigger such. I lost where this was posted, more so with people not really playing around with custom sounds that it's a shame... This is why I'm asking here.


    If anybody has played with these custom sounds then please do chime in because we honestly need to break ground. If you guys won't, then I will. I want to get custom sounds playing that I also want to make someone happy by being able to play the following embedded video in Rising World... Not video wise, just music.



    I have many more things on my end that I would love to get going that I want to build a 'concert hall' in Rising World that it's been an old idea even from Minecraft era. Please tell me that that the 'Custom Sound API' is easy to use..... Also please do tell me so we can get the ball rolling that I hate something so powerful sitting idle. It's like leaving a BMW, Porsche, or similar just sitting in the parking lot all day.......


    Let's get the ball rolling.

  • Well, that silence isn't reassuring that I can see why it's been sitting idle for so long. Well, I'm finally back home again for 3 days of peace and quiet that I want to break ground for this Custom Sound API thing that I need "some" clarification on it. Now that I have time I did a quick forum search that it lead me to these:


    https://javadoc.rising-world.n…ils/SoundInformation.html


    https://javadoc.rising-world.n…meSound-java.lang.String-


    Sound Support


    From what I'm gathering it can only play the current sounds, yet with a bit of fiddling it 'may' even play external sounds to it. You could add your own sound-effects, and such. That's neat and all, but what I'm looking for is to push this 'Custom Sound API' feature to a more 'Jukebox' state of things similar to how it's done in VRchat. What I want to be able to do is either:


    1) Set up an area where music would play in that determined box area (in a pre-determined area),
    2) Make a jukebox type thing where when you click or hit it that it would play, stop, or go to the next track..... (May need buttons and levers for this one, or an actual jukebox to configure from an .mp3 folder?)


    I fear we may need actual buttons and leavers to make use of custom sounds similar to how StaticModel plugins are done. I'm however yawning up a storm from how exhausted I am from work that tonight may not be the best, but the three following days would be. If you know something please do tell me.


    Please do help me within the three days as I can focus on it the most then.

  • There is indeed support for custom sound files. But it's important to put the sound files on your server, i.e. the game cannot stream audio from a homepage, for example. But just like images or models, the sound files were downloaded automatically.


    Just set up a "SoundInformation" object which is basically a reference to the audio file on your machine. It's recommendable to set up the "SoundInformation" object only once (e.g. in the plugin "onEnable()" function) and reuse it for every player.


    Here is an example plugin which plays a music file (file called "AwesomeMix1.mp3" located in the plugin folder under "music") for all players if someone interacts with a sign which contains the text "Play music":

    If you have any questions, don't hesitate to ask :)

  • Well, I have a lot of questions that I still don't know how to use them because someone has to show how it's done for me to tweak and change things. I do thank you for posting that, for showing what goes where, just that I'm still too much of an idiot to make proper use of it. I wouldn't know how to take that to play custom sound that I think I have to bug someone to make me a plugin that I could tweak similar to how you tweak the server files.


    So, you're saying if we hit signs to play them? Awesome. Still recommend buttons and levers, or some "interactive" objects. I can work something out, just need a simplified tutorial to work off of. I never coded something like this.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!