AmbientSpout Reloaded
How to setup
Step 1 - Configuration:
- Spout is required.
- Start your server with the plugin installed. The plugin will generate the necessary files for you.
- Shut down your server and change config.yml to your likings.
Step 2 - Adding music:
There are two ways of adding music (or sounds). Either, you make use of the built-in webserver, or you provide links to where the music can be found.
You can use both methods simoultaneously.
<< Built-in Webserver >>
With this method, you place your sounds in a specific folder (probably AmbientSpout/Resources/Ambient or AmbientSpout/Resources/EffectLoop).
For .wav files: Simply drag and drop them in.
For .ogg files: Make the last 3 characters of the filename the length of the song in seconds. Say the song (or sound) is 1 min 32 long, 1*60sec + 32 = 92.
You name your file music092.ogg (or whichever other name you like).
Note that using the webserver will use bandwidth of your server.
<< Providing Links >>
In AmbientSpout/Resources you can find Ambient.txt. In this file, you can add links to sound files. Add them in this format, one per line:
<SONGLENGTH> <LINK>
Example:
123 http://google.com/song.ogg
NOTE: The link has to be a non-secure HTTP link, so not https://. I am saying this because DropBox gives https: links nowadays, just remove the s at the end .
Providing links is suggested (instead of webserver) if you fear the upload speed of your server is not the best, or you pay per bandwidth use.
Step 3 - OPTIONAL: Configuring WebServer:
In case you want to make use of the built-in webserver, you will have to configure it.
In config.yml you have to add configure these fields:
HostAdress: Your host address (most likely the sameas the IP of the minecraft server.
HostPort: The port you want the webserver to run on (the default should be just fine in most cases).
EnableWebServer: Boolean value, do you want to use the webserver (you probably do, as you are reading this).
Example:
HostAdress: myawesomeserver.minecrafthost.com
HostPort: 5651
EnableWebServer: true
How do I know if the webserver is working?
Everything in the Resources folder is hosted. Because Ambient.txt is always present, try to go to this address:
http://HostAdress:HostPort/Ambient.txt
Example:
http://myawesomeserver.minecrafthost.com:5651/Ambient.txt
If you see the contents of your Ambient.txt file, then congratulations, it's working! (Note that Ambient.txt may be empty if you didn't add anything to it.)
"="-key is used to open the overlay by default.
A collection of posts about the functionality + configuration:
If anyone is interested in the current version, I can put it up here with a few instructions..
Screenshots:
Resources
Configuration
It will automatically find out the length of .wav files, unfortunately this is not possible (without adding an external library that is +100MB big) to do this automatically for .ogg files.
The easiest solution I found, is to put the duration of the ogg file in the name itself. The last 3 digits indicate the length in seconds.
"="-key is used to open the screen.
Put .ogg files in AmbientSpout/Resources/Ambient.
Last 3 characters of ogg filename must be the song length in seconds.
NOTE: Currently does not save player-data between server resets. So if a player disables music, and the server restarts, and the player starts again, it will be enabled (if DefaultOn is set to true, that is).
A little bit about the config:
Delaybetweensongs: that should be pretty clear. Delay between songs advised +30sec
DelayRandomness: Say you have 10 as delay, and 2 as randomness, the actual delay will be between 8 and 12 seconds.
FadeOutLength: Pretty straight-forward
DefaultOn: Do players start with music on when they (first) join?
MusicAreaEnabled: Not implemented yet, no effect.
DevMessage: Please keep this set on true, in case I join ;3
UseBackgroundImage: Whether you want to use a background image. Note: No need to worry about it overlapping the buttons, it will ALWAYS be in the back. Can be jpg or png, and can be transparent. For fullscreen: 427 by 240 pixels.
BackgroundImage: Link to the image you want to use.
EnableWebServer: Leave this on true, as it is the only way to have music , a list will probably be implemented later (so you can host files elsewhere, like the old AmbientSpout)
HostAddress: Put your server IP or hostname here.
HostPort: Pick a port you like
EffectLoops are effects that can be added quite easily to a specific place. For example, Seagull sounds in a harbor, waterfall sounds near a waterfall . As the name implies, they loop.
A few more things about new features..
-One can now add non-webserver sounds by adding lines to a text file, the first number indicating the length of said sound file.
- It now remembers whether or not the user has music enabled.
- Effectloops are saved in human-readable form, so one can easily edit it/add to it from outside.
In order:
ID (string name to be able to recognize said effectloop)
Length in seconds
URL
X coord
Y coord
Z coord
Worldname
VolumePercent
Distance it can be heard from
Active (enabled or not)
- Added metrics
- Quite a lot of performance improvements..
<< Note, you are going to have to add the effectloops manually for now, haven't finished the GUI for that yet . The future permission node: ambientspout.admin > This will already show a button to go to the effectloops management screen.
EffectLoops are effects that can be added quite easily to a specific place. For example, Seagull sounds in a harbor, waterfall sounds near a waterfall . As the name implies, they loop.
A few more things about new features..
-One can now add non-webserver sounds by adding lines to a text file, the first number indicating the length of said sound file.
- It now remembers whether or not the user has music enabled.
- Effectloops are saved in human-readable form, so one can easily edit it/add to it from outside.
In order:
ID (string name to be able to recognize said effectloop)
Length in seconds
URL
X coord
Y coord
Z coord
Worldname
VolumePercent
Distance it can be heard from
Active (enabled or not)
- Added metrics
- Quite a lot of performance improvements..
<< Note, you are going to have to add the effectloops manually for now, haven't finished the GUI for that yet . The future permission node: ambientspout.admin > This will already show a button to go to the effectloops management screen.
Also, timings seem to be quite high. I'm wondering if there is a connection between the NPE and this.
You can add different sounds according to the time?, Such as day and night.
@dretax
Thanks for the update!
However, it still gives an exception and the music doesn't play
http://pastie.org/7929630
Running on:
CB# 2771 and Spoutplugin Build 1447
@lANTHONYl
I will add it soon.
@dretax
lol. Any word on additional features? A /asr reload command would be very helpful.
@lANTHONYl
I don't even remember what the hell did i fix, i just kept fixing code xDD
@dretax
Care to give a little more verbose changelog there? lol
@lANTHONYl
Okay Try this one, it should work:
http://dev.bukkit.org/server-mods/ambientspout-reloaded/files/2-ambient-spout-reloaded-1-0-1/
@dretax
I did not. I'm not exactly in a position to do that either on my production server. I'd need to reinstate the dev server and i'm a little tied up right now. I did go to the spout forums to ask for some insight here. Might want to take a look at the thread.
@lANTHONYl
Good to know xD
@predawnia
Did you guys check what happens if you remove jobs?
@predawnia
Hmm... i use jobs as well. Wonder if phrstbrn has anything to say about this...
@dretax
@lANTHONYl
Yup! For me it is throwing NPEs whenever I have the new version of Jobs (v2.11.0) loaded.
Here is the error log: http://pastie.org/7821841
Maybe you should see what it is conflicting with
AmbientSpout is throwing errors now using 1.5.2
hey dretax,
tried the effectloops and it is working so far. however the songs overlap after time. any idea? using spigot #830 and spout #1443.
regards
@dretax
You can subscribe to your own projects and get email notifications.
@Q2Lummox
Crap want looking this project
@lANTHONYl
Ticket created :P
@Q2Lummox
Be sure to put feature requests in the Ticket system under the "Enhancement" option so they don't get lost in the comments section :)
Thanks, now if that works.
One suggestion:
Could be added to the sounds "effectloops" an option "time"?.
For example:
MyAudioFile 268 http://dl.dropbox.com/some_file.wav 0 66 0 spawn 35 120 9:00 true
MyAudioFile 268 http://dl.dropbox.com/some_file.wav 0 66 0 spawn 35 120 22:00 true
<identifier> <duration> <URL> <x y z coordinates> <world> <volume> <distance> <time> <enabled>
To have a different sound of day or night. You can use the value "all", this way:
MyAudioFile 268 http://dl.dropbox.com/some_file.wav 0 66 0 spawn 35 120 all true
To indicate that sounded the same sound at any time.
|----------------------------------|--------------------------------|---------------------------------|
Another suggestion.
You can add a list of songs?, Instead of having a button "Next song", have a list of available songs. Would be nice to separate them by type. e.g.
Exploration -> Songs List exploration
War -> Track Listing for war
Relaxation -> Track Listing for relaxing
Etc. ..
|----------------------------------|--------------------------------|---------------------------------|
And a doubt, how I can reduce the time that passes, since ends a sound, until it starts again?.
Great job!
@Q2Lummox
Use the /AmbientSpout/effectloops.txt file. The format of that is:
Here's the syntax example: