Yeah, so anyway, i rewrote this whole post for the new epic awesome release of Extended Music Mod... only to have minecraftforum.net apparently ignore me...
SO WHATEVER. I'm going to just post a barebones release page. If you want more info read the README.txt in the new release zip.
Vid of Battle Music in action:
Currently it works as follows:
[*:3bend841] Biome Music:
When the game decides to play some background music, it will check to see if you have specified custom music files for it to play based on the biome that you are presently standing in. If you have, it will pick one of those files. If you haven't, it will use the default store.
[*:3bend841] Battle Music:
When a mob begins to "pursue" you, check the "pursuit" counter. If it is 0, increment it and start playing music.
When a mob stops "pursuing" you, decrement the "pursuit" counter. If the counter gets to 0 (i.e. no mobs following you), then it will wait 5 seconds, if after 5 seconds no new mobs are following you, then the music will fade out over 5 seconds.
As for "pursuit", it is interpreted as follows: A mob will begin pursuit if you are within 16 blocks of it and it can "see" you (i.e. line-of-sight). They stop pursuing you if you get at least 32 blocks away (ignoring line-of-sight), as by then they have stopped following you. Pursuit also ends if the mob dies (obviously).
[*:3bend841] BACKUP YOUR EXISTING minecraft.jar!!!
[*:3bend841] Open minecraft.jar
[*:3bend841] Delete the META-INF folder
[*:3bend841] Copy the contents of the bin/ directory (within this archive) into the root of the jar (will overwrite/create some files).
[*:3bend841] Save the jar and close it.
[*:3bend841] Copy desired biome/battle ogg files into resources/streaming
[*:3bend841] Edit config files accordingly
For now, read the README.txt for more info
If in doubt, look at the auto-generated config file for an example of how this works.
[*:3bend841] updated to work with 1.2.6
[*:3bend841] added ability to modify how long to wait between music
[*:3bend841] fixed bug where game would crash on exit of world if sound system was never$
[*:3bend841] fixed bug where battle music would keep playing after player death
[*:3bend841] updated to work with 1.2.3_04
[*:3bend841] changed name
[*:3bend841] biome-specific stuff!
[*:3bend841] updated to work with 1.2.3_01
[*:3bend841] added ability to set stopDelay and fadeOutLength parameters
[*:3bend841] better music logic (fixed a couple of bugs with music stopping when it shouldn't)
[*:3bend841] random battle music selected from any files of the form "[filename][#].ogg"
[*:3bend841] selectable music based on mob
[*:3bend841] fully configurable (seriously) using .minecraft/config/BattleMod.ini
[*:3bend841] initial release
NOTE: THIS MOD DOES NOT REQUIRE A SOUND-ENABLER MOD SUCH AS SOUNDMOD! IT WILL NOT FUNCTION WITH ONE AS IT REQUIRES ITS OWN CUSTOM DERIVATIVE OF SOUNDMOD IN ORDER TO ADD ADDITIONAL MUSIC RESOURCES.
Cool. But whyed it keep playing after you killed the monster??
I haven't worked out exactly how i want the "stop playing" code to work yet. There are some problems with stopping simply when all pursuers are gone, as if you are right on the edge of their pursuit radius the music might continually stop and start.
I'm thinking of having a timer and basically once all pursuers are gone, it waits 5-10 seconds and if no more pursuers show up, stops the music. Though that also adds another problem as I'd like to see the music fade out, but the audio system for this is kind of convoluted. Technically I'm using the same system by which records are played to make this work.
Which is why you change the music. Once modded, it's extremely easy to change the music (it's as easy as installing a downloaded Minecraft save. It's easier than installing a mod). If this is your complaint, then please go look for more information, because complaining about the music here is like complaining about the air freshener in your car. It's not hard to fix.
[EDIT]lol. Oops. fixed a tag typo (unless they edited their post, see below). :tongue.gif: Mouser X over and out.
Alright, I have figured out a few more things. At present, the music will stop/start. The way it works is this:
Once an enemy begins pursuit (i.e. when you are within a 16 block radius of the enemy and within line-of-sight), it will start the battle music.
A count is kept of the number of enemies currently pursuing.
"Pursuit" is seen as ended as soon as either a.) the enemy dies, or b.) you run at least 32 blocks away from it (the radius to end pursuit is double that of the radius to start it, this seems more adequate as technically enemies NEVER FORGET who they began pursuing until the player dies, so they will continue chase until their search algorithm fails. I'm not sure how far that is but 32 blocks seemed like a good radius.
Once the count of pursuers reaches 0, a 10 second timer starts.
If another person beings pursuit, the timer is cancelled.
If not, then when the timer goes off the music will stop.
Things that still need some work:
[*:2vvszguo] Creeper code needs to be customized so "pursuit" doesn't register until a failed explosion attempt (because if you avoided it then you know it's creeping you).
[*:2vvszguo] Spiders aren't considered "Mobs" apparently... so I need to modify that code to get them to work.
[*:2vvszguo] Ghasts/ZPigs seem to have independent mob code, need to look into that.
[*:2vvszguo] Need to find an easy way to access the audio manager in order to cause "fade-out". Might require direct modification to the manager, which could get ugly.