[MISC] BiomeSound v1.1 - Biome-based Ambient Sounds [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Laurina, Jul 28, 2011.

  1. Offline

    Laurina

    BiomeSound - Biome-Based Ambient Sounds:

    Version: v1.1

    This plugin requires BukkitContrib or Spout, and only clients using the BukkitContribSP mod or SpoutCraft client will benefit.
    Running the server once with BiomeSound installed will generate an example config.yml in the BiomeSound folder.
    Edit this as required (it will do nothing in its default state).

    Code:
    sound:
        desert: http://your.site.here/desertwind.ogg
        range: 45
        forest:
            night: http://your.site.here/forest_night.ogg
            day: http://your.site.here/forest_day.ogg
        boat: http://your.site.here/rowing.ogg
        rainforest:
            night: http://your.site.here/rainforest_night.ogg
            day: http://your.site.here/rainforest_day.ogg
        nodeseparation: 20
        open:
            night: http://your.site.here/nighttime.ogg
            day: http://your.site.here/daytime.ogg
        volume: 70
        train: http://your.site.here/train.ogg
        arctic: http://your.site.here/arcticwind.ogg
        nether: http://your.site.here/nether.ogg
        underground: http://your.site.here/underground.ogg
        swamp:
            night: http://your.site.here/swamp_night.ogg
            day: http://your.site.here/swamp_day.ogg
        lava: http://your.site.here/lava.ogg
    The plugin works by causing a client-side sound to play at the player's current location.
    Another sound will play when the player has moved a certain distance from the last location where a sound started playing.
    You can adjust this distance with the nodeseparation parameter.
    The reason for doing it this way is to create subtle volume variations and the possible mixing of sounds (i.e. between two biomes).
    Exceptions are the boat and train sounds; these have no world locations and play at a uniform volume.
    The range parameter defines how far away the sound is audible.
    The volume parameter defines the absolute volume at which sounds play. Adjust this to taste.
    Sounds must reside on a webserver from where clients download them automatically. Downloaded sounds are cached, and so will only be redownloaded if the cache is deleted.
    Soundfiles must be long (10-15 minutes), with the exception of the boat and train sounds (these should be about 10 seconds long)..
    A set of royalty-free soundfiles that work well can be downloaded below.
    A silence.wav file is included, and can be used in case there are instances where you don't want a sound to play.

    Credits:
    This plugin is based on BiomeMessage by robin0van0der0v, and retains the /biome command functionality from it.

    Features:
    • Causes client to play ambient sound appropriate to Biome.
    • Plays different sounds in the day and in the night, where appropriate.
    • Plays specific ambient sound when the player is deep enough underground.
    • Plays sound effects when the player is using a minecart or boat.
    • Plays sound effect when the player is near lava.
    • Use the /biome (or /b) command to learn what biome you're standing in.
    • Ops can use the command to check the biome locations of other players.
    Download BiomeSound v1.1 (for BukkitContrib 0.1.7)
    Download BiomeSound v1.1 (for Spout 1.0.1)
    (source code included in .jar)

    Download Sound Pack
    (85 MiB)
    Download only the lava sound (for those who have the old Sound Pack)

    Changelog:
    Version 1.1
    • Project split into continued BukkitContrib support as well as Spout support.
    • Lava effect added.
    • Clients now always play ambient sound at their login location. Before, they would only do so the first time they logged in after a server restart.
    Version 1.0
    • Release
     
    Moe041991 likes this.
  2. Offline

    paully104

    Works pretty well so far, testing for errors​
    Errors i've encountered​
    1. Overrides BCMusic 2.0 can't play music that way
    2. Server lag went way up, i'll look into the log and see whats up
    Request if possible​
    1. Is it possible to stream this as sound effects in the background and then let actual music override? For example i have a desert ambient noise pack but when they walk into town i want BCMusic to have priority and have the ambient noise in the background.
    Error​
    Show Spoiler
    org.bukkit.command.CommandException: Unhandled exception executing command 'bcm' in plugin BCMusic v2.0
    Show Spoiler

    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)​
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)​
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)​
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)​
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)​
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)​
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)​
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)​
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)​
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)​
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)​
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)​
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)​
    Caused by: java.lang.NullPointerException​
    at org.bukkitcontrib.sound.SimpleSoundManager.playCustomFile(SimpleSoundManager.java:303)​
    at org.bukkitcontrib.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:163)​
    at org.bukkitcontrib.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:157)​
    at org.bukkitcontrib.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:151)​
    at org.bukkitcontrib.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:145)​
    at me.ic3d.bcm.BCMcmd.onCommand(BCMcmd.java:44)​
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)​
    ... 12 more​
     
  3. Offline

    King Rat

    This looks pretty interesting :D But wouldn't it be easier to just use something like MAtmos?
     
  4. Offline

    Laurina

    Odd... I don't know why it would do that.
    Anyway, my plugin doesn't use BukkitContrib's music interface at all, so soundeffects and music should be able to stream comfortably side by side.
    I use BukkitContrib Essentials on my server for music, and that works fine.

    As for the lag, I run a rather small server. It has no trouble. However, a large number of players might cause some lag.
     
  5. Offline

    paully104

    Actually i removed the plugin inception and now everything is working as it should. Ambient noise is instead under the sound tab. BCmusic is playing over the music tab. Odd that randomly that plugins conflicts though.
     
  6. Offline

    Laurina

    Um... probably? :)
    But now that I wrote this, I'll be damned if I'm just going to bin it ;)
     
  7. Offline

    Montpelier

    If you've been following Bukkitcontrib's development you'll know that Modloader and BC are incompatible by design, so unless MAtmos gets a port this is the preferable choice for anyone using Bukkitcontrib.
     
  8. Offline

    Laurina

    You make a fine point ;)
     
  9. Offline

    King Rat

    Congratulations, you have out-smarted me. o.o
     
  10. Offline

    Moe041991

    this is great! but I just need to find me some good source for sounds :)
     
  11. Offline

    Laurina

    The sound package I provided consists entirely of sounds from http://www.freesound.org
    If you register there, you can download any number of files you like, and all of them are released under creative commons license.
     
    Moe041991 likes this.
  12. Offline

    philipborg

  13. Offline

    Laurina

    That's good, thanks :)
    So, it's nicknamed 'spout'? I had no idea :)
     
  14. Offline

    philipborg

    Check out the spout plugin list, the guys posted that it is doing an name change in next version. So it is just not a nickname. But I would have guessed that it was an nickname to if I did not now ;)
     
  15. Offline

    Alphard

    Can I request some stuff?

    * Midi music support
    * Music for Rain/Snow
    * Integration with region ownership plugins for custom music on player owned areas.
     
  16. Offline

    Laurina

    Well, music is really outside the scope of this plugin, though you may of course use tunes instead of soundeffects if you like (though to rather poor effect, I imagine).
    Have a look at http://forums.bukkit.org/threads/ad...apes-music-notifications-and-more-1000.25399/
    It lets you define cuboid areas where music plays, and it does support midi files. There's no integration with ownership plugins yet, as far as I know.
    It also comes with commands for playing music, both globally and locally, and supports permissions.
     
  17. Offline

    Alphard

    Oh sorry, I thought Biomesound would work for music too.
    Well, anyway, thanks.
     
  18. Offline

    Moe041991

    BCE doesnt work for me though :(
     
  19. Offline

    AgentKid

    @Laurina Cool plugin; been searching for something like this for awhile. :) One request, though. For minecarts and boats, can you add a separate file for moving and not moving? It's a bit odd when you get in a mine cart and it's not moving, yet it sounds like it is :p
     
  20. Offline

    IncendiaDrakon

    Do the sounds play from the music volume, or sounds volume? I always have music muted, since I don't like how the game decides to randomly play music. Unfortunately I've noticed some plugins play off of the game's sound volume.
     
  21. Offline

    Laurina

    You'll still hear these sounds if you have music off.
    In other words, the plugin plays the sounds off of the game's sound volume.
    This is so in order to allow music and ambient sounds to coexist. Had I used the music interface, any playing music would be cut short whenever a new sound would start playing.

    Unfortunately, BukkitContrib has no facility for stopping an already playing sound effect. That's the reason the train and boat sound files have to be kept short.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  22. Offline

    Montpelier

    So I've been using this for a while now. For the moment all I can really suggest is that the ambient loops could do with having less distinct startups, as there are certain noises that make the loop plainly obvious (I mainly noticed the crow/wolf combo at the start of the rainforest-night track) but it's suppose it's not easy to find a ten minute stream of completely nondescript ambience. Maybe start the loops at a random point in the duration?

    Is the plugin going to be left as is or do you have future plans for it? Can Bukkit support ambience from specific blocks or are you going to wait to see if they include default support in 1.8? Have you considered splitting into random locational animal noises and a static wind/acoustics track? Is there any way to distinguish between indoor and outdoor sounds like MAtmos's weird block scanning algorithm? Question mark?
     
  23. Offline

    Laurina

    All very good questions :)
    BukkitContrib currently limits what can be done about some of the issues.
    Concerns about server lag limits others, as I'm trying to keep it as light-weight as possible.
    A more discerning block-scanning algorithm could certainly be written, but it would cause more lag if it's server-side (and it would be, if part of this plugin). Ideally, BukkitContrib would incorporate MAtmos-like functionality into the client-side mod, taking most of the computing load for this sort of thing off the server.
    As it is, there is an algorithm to figure out whether you're outdoors/very near the surface, or below ground. It looks at a column of blocks from the player's Y position upwards and counts typical blocks such as stone and dirt. It also checks a few blocks below the player to determine whether or not the player is over water, to (for example) prevent forest noises from playing while swimming or walking on ice.

    I'm also limited by the fact that BukkitContrib doesn't provide a means of actually stopping a sound effect from playing once it's started. It can stop tracks playing as music, but not sound effects. I don't want to use the music interface, though, as that would pretty much ruin all music in the game, both original and BukkitContrib-generated.
    Thus, if a forest sound starts playing just before you enter a building, it will keep on playing after you've entered it, even if the blockscanner detects you as being underground. That'll affect the next sound played, but won't do a thing about any sounds currently playing.
    The lack of any audio occlusion is also a bit disturbing; it is rather weird to be indoors, yet hear outdoor sounds without any sort of muffling. Unfortunately, it's beyond this plugin to do anything about, and I suspect BukkitContrib couldn't provide it if it wanted to.
    Starting the loops at random points in the duration is a good idea, but again would require support inside BukkitContrib (that is if PaulsCode/LWJGL even provide such functionality to begin with).
    Providing more than one track for each situation (say, 3 or 4 instead) to be played randomly might remedy the situation, but would result in much more to download.
    Splitting the components of tracks is another good idea, in principle, but making it actually sound good is another matter. Just finding all the required sound files (or making them) would be a monumental task.

    All that said, I do have plans for refining the plugin and adding things to it.
    First of all, I think I should make the parameters of the block scanning algorithm definable in the config file.
     
  24. Offline

    Grammar Troll

    Spout is the new BukkitContrib, and since all the names and such were refactored, all the BukkitContrib plugins will have to be updated to use Spout.
     
  25. Offline

    ArtBot

    What's this?

     
  26. Offline

    Laurina

    That is an exception log ;)
    It's fairly generic, unfortunately.
    Is this under BukkitContrib or Spout? I have yet to upgrade to spout, so I don't know if it would work under it.
    I assume your sounds are all of supported types?
     
  27. Offline

    rslink

    I think its because he isn't using a wav, ogg, or mid file, and is some type of other sound file.
     
  28. Offline

    ArtBot

    The sounds are from your .zip file. I uploaded them to a site for people to download. Put the links in the config file, and started the server. This happens every time someone changes chunks. No sounds play either...
     
  29. Offline

    Laurina

    Something is clearly odd, then. I don't know what, though.
    The plugin was written to work with BukkitContrib. If it runs under Spout, which it apparently will, and someone with a client still using an older BukkitContribSP mod connects to it, the server throws all kinds of errors.

    While I appreciate the practicality of Spout from the point of view of Spout developers, it's not exactly what I'd call friendly to other mods. The launcher overwrites the main .jar whenever it feels like it (when there's a new version).

    I'm certainly not going to be downgrading my highly modded client (GLSL, Dynamic Lights, Zan's Minimap, WildGrass, et. al.) just to make it compatible with Spout. It's just too much to give up.
    Perhaps later on, it will mature into something I can work with, but it isn't now.
    In fact, my server (CB 1000) won't run Spout properly; even when it's the basic SpoutCraft client logging into it and without BiomeSound even being present. Perhaps other bukkit plugins are causing it, but I'm not giving any of those up either.

    Does BiomeSound work for anyone under Spout, by the way?
     
  30. Offline

    IncendiaDrakon

    This is pretty sad, since I just got your plugin running. Now I'll have to drop it so I can update BukkitContrib/Spout.
     

Share This Page