This mod is to be considered beta for raid conditions (it hasn't been tested, therefore I don't know how it'll behave). But after thourough testing in single-player, and in a party, I'm bringing it out of beta for those instances. If you solo or play in a party, this mod should perform properly.
What does it do?
Epica exists because I find grinding mobs to be a little flat, it could always be a little more fun, couldn't it? So Epica adds music to combat situations. It accounts for four combat conditions; aggro, combat itself, fleeing, and victory. Each of these instances can have a playlist setup for it, and the mod will pick a track at random from those playlists.
New functionality as of revision120508: Music can now be selected for instances, such as PvP/BG, 5~man/40~man and so on. The music can now be even more epic for those epic bosses!
How do I use it?
The configuration screen can be reached by typing /epica or by going into the main menu, then Interface, then into the Addons tab.
There are four sections to the options, and two options for each. These options exist to allow you to manage your tracks, both adding and deleting thereof. Simply drop a music file in the Media folder, then in-game use the options to add that track. More information is contained within the mod itself as to how to add tracks in-game.
There are other elements that I'll cover here too, such as; what constitutes a particular combat state, and what type of music to use.
Aggro - This is initiated when a mob starts chasing you, and it continues right up until the moment that you or anyone in your party (or possibly your raid, not sure about how that works) hits the chasing mob(s). The music for aggro will be looped and therefore a longer track might serve this the best.
Combat - This is initiated after aggro or immediately, it's triggered by the first blow (spell, ranged, melee, et cetera) triggered by anyone in the party (or possibly, the raid). So if you or a party member strikes a mob to begin combat, or you strike a mob that's chasing, then combat music begins. The music for combat will be looped and therefore a longer track might serve this the best.
Victory - This is decided by what your party is doing after a mob dies. For example: If you leave combat after killing something, but there are mobs chasing you and/or hitting you, this does not equal a victory state because all the mobs that were pulled in were not dealt with. If all mobs are dealt with and you exit combat with no aggro, then that's a victory state and the victory music will play. The music for victories plays once and thus a shorter track (such as a jingle) might be best suited to this.
Fleeing - This one's easy, running from combat institutes this, regardless of what happened in combat. If you're running from aggro, then this music doesn't trigger because you never entered into combat. However, if you enter into combat and you're found to be fleeing at the end of it, then this music will play. The music for fleeing plays once and thus a shorter track (such as a jingle) might be best suited to this.
Any problems?
The logic for dealing with combat/victories within a party might be a little off. I'm not sure whether it works for raids at all.
I'd appreciate some testing done on it and all the conditions by anyone who's willing. If you find any strange behaviour or errors, report them here along with what you/the party/the raid was doing at the time (or a rough approximation thereof).
Plans for the future?
I definitely plan to add more to Epica, as it's not yet feature complete and therefore not to my satisfaction. But for now, I wanted to get this earliest version out there (so to speak) so that I could hopefully find any major bugs early in development, rather than later.
Eventually I hope to be able to add in different combat music for rares, elites, bosses, and so on. Perhaps even combat music that can be linked to certain instances and so on. Lots of things going around in my noggin, really...
Change Log - Epica
revision160508: Hopefully got the embeds sorted out now.
revision130508b: Music should not start playing for you unless you're actually involved in the combat, via yourself or your pet by proxy. If another party member engages in combat, and finishes the combat by himself, Epica will do nothing. This is how the Addon should behave, but it wasn't. I've now moved things around so that hopefully this behaviour will be true. The error in logic which caused the Addon to not follow that behavioural pattern also seems to be why music would start playing in some battles and not stop (so that's been fixed, I think).
revision130508: Another fix for the judging logic. There's a time between where the last mob is killed and when the player exits combat where they could be damaged, perhaps even by a debuff or a rogue ranged attack. I've tried to accountf or this by giving the victory status a buffer-zone of sorts, of half a second. This should help deal with this condition without breaking the running logic. Let me know how it works out for you, as this is proving a tough nut to crack. Aside from that, I've tried to solve an issue wherein the combat music won't end, even after exiting combat. If this persists, I'll have to do some debugging... it's a weird problem.
revision120508d: Epica now supports music for instances. Combat music will be replaced for PvP, BG, 5~man and 40~man instances if the playlists for those conditionals have any tracks in them (otherwise the usual combat music will play). I've cleaned up the unit scanning too but it's still a bit too much for my tastes, I'll look into using a library for that... but that's difficult because they all seem to be Rock/Ace2 (as opposed to LibStub and therefore framework-agnostic). Any suggestions?
revision120508b/c: Conditionals fixed up.
revision120508: Initial release.
Optional Files - Epica
Sorry, there are currently no optional files available.
I feel there's too much of that in the World already. I admit, I have my bouts of it but usually there's some silly undertone in even the most useful things I create. I leave the practical things mostly to the other guys, the Godlike coders who can pull off crazy things. I take the silly stuff, the fun stuff... because I play this game for fun, and I'd like my coding thereof to be fun too.
If I have a work ethos, it's to help make Warcraft more fun. It could always use that.