BLU | Better Level Up!

BLU | Better Level Up!

23.7k Downloads

[Feature Request] battle & boss battle music if possible??

MelchiorGaspar opened this issue ยท 28 comments

commented

It is possible to had well known and loved battle and boss battle music from say Final Fantasy 4 among others?
Is it even possible to trigger the music?
Since WoW-retail/classic doesn't have battle music at all.. :(
unlike say Final Fantasy 14 online.

commented

I pushed 3 builds for 10.1 last night. I still need to publish github releases.

ooh ok ty so much.

any word on my opening post request for battle music? or is it not possible?

commented

plus, could you please update retail build for v10.1.0?
please and thx.

commented

I pushed 3 builds for 10.1 last night. I still need to publish github releases.

commented

Ok, so I forgot to reply to that. The issue with doing battle music is copyright laws. My sound bits are not long but it's still a grey area. The longer the sound file the higher chance for issue. I think fair use is something like, under 30 seconds?

commented

ooh.. ok yeah, I wouldn't want you to get in trouble...
in that case I can just close this..
thx for the reply.

commented

will you be updating on CurseForge soon?
That is how I grab my addon updates.
please and thx.

commented

I did not test this. I just transcribed for ChatGPT so you could get the AddOn you want.

commented

image

Core.lua

local frame = CreateFrame("Frame")
local sound = CreateFrame("Sound")

local function PlaySong()
    sound:PlaySoundFile("Interface\\AddOns\\CombatMusic\\MySong.mp3", "Master")
end

local function StopSong()
    sound:StopSound()
end

frame:RegisterEvent("PLAYER_REGEN_DISABLED")
frame:SetScript("OnEvent", PlaySong)

frame:RegisterEvent("PLAYER_REGEN_ENABLED")
frame:SetScript("OnEvent", StopSong)

CombatMusic.toc

## Interface: 100100
## Version: 0.0.1
## Title: |cff05dffaCombat|r Music!
## Notes: Play  |n|r    |cff05dffaBattle|r Music!
## Author: 
## SavedVariables: 
## OptionalDeps: 
## IconTexture: 

## X-Category: UI Media, Questing & Leveling, Audio & Video, Miscellaneous
## X-Website: 
## X-Curse-Project-ID: 
## X-Tukui-ProjectID: 
## X-Wago-ID: 
## X-WoWI-ID: 

Core.lua

Make a folder in your AddOn directory and call it CombatMusic.
Make these 2 files and put them in that folder. (CombatMusic.toc//Core.lua)
Put your combat song into the CombatMusic folder and either name it 'MySong.mp3' or change the code to the name of your song.

commented

nice, ty
I will give it a try.

commented

got it ready to go will test now.
:D ^_^

commented

I tested in retail v10.1.0.49444
got an error lol

1x CombatMusic/Core.lua:2: CreateFrame: Unknown frame type 'Sound'
[string "=[C]"]: in function `CreateFrame'
[string "@CombatMusic/Core.lua"]:2: in main chunk

Locals:
(*temporary) = "Sound"

commented
local Event_Frame_A = CreateFrame("Frame")
Event_Frame_A:RegisterEvent("PLAYER_REGEN_DISABLED")
Event_Frame_A:SetScript("OnEvent",
	function(self, event, ...)
		PlaySoundFile("Interface\\AddOns\\CombatMusic\\MySong.mp3", "Master")
	end)


local Event_Frame_B = CreateFrame("Frame")
Event_Frame_B:RegisterEvent("PLAYER_REGEN_ENABLED")
Event_Frame_B:SetScript("OnEvent",
	function(self, event, ...)
		MuteSoundFile("Interface\\AddOns\\CombatMusic\\MySong.mp3", "Master")
	end)

Wrote this for you, not sure if it works. Gonna test soon as my client updates.

commented

Turns out its PlayMusic and StopMusic() but I can't seem to get the combat/regen triggers to work.

commented

ty for the effort ;) :D

commented

self:RegisterEvent("PLAYER_ENTER_COMBAT");
self:RegisterEvent("PLAYER_LEAVE_COMBAT");

commented

thx for the help @donniedice.
when you have it working feel free to post the complete final code..
So I can copy and paste it into the core.lua file.

I don't really know what to do with the code snippets... by themselves.

commented
local Event_Frame_A = CreateFrame("Frame")
Event_Frame_A:RegisterEvent("PLAYER_ENTER_COMBAT");
Event_Frame_A:SetScript("OnEvent",
	function(self, event, ...)
		PlayMusic("Interface\\AddOns\\CombatMusic\\MySong.mp3", "Master")
	end)


local Event_Frame_B = CreateFrame("Frame")
Event_Frame_B:RegisterEvent("PLAYER_LEAVE_COMBAT");
Event_Frame_B:SetScript("OnEvent",
	function(self, event, ...)
		StopMusic("Interface\\AddOns\\CombatMusic\\MySong.mp3", "Master")
	end)

See if this works.. Also I'm finishing up testing on my v1.0.0 re-write of BLU. Condensed the code using tables and string variables. Let me know if you wanna help beta test this. I need to fix a few more things, find sound file id and a few other things. But it should be cool. I think I found a way to add sounds for trade post activity completion. Battle-pet and hunter-pet level ups. My accounts trade post is done this month so I can't test that feature >_<

commented

ty, I will give it a try and test CombatMusic out.
so I may be able to beta test BLU for you if you want.
but I only just woke up, so it will be a little while..

commented

retail is down for maintenance till 2pm or so so testing will have to wait. lol

commented

BLU v0.0.19 seems to be working well...
as I haven't had any LUA errors in the BugSack to report on.

commented

Huwayy! it works!
epic battles here I come.. lol ty!
only one small issue is that the music stops even though I had more then one mob attacking me..
ex. Mists of Pandaria, just outside the first village of Paw'don Village..
fighting three peons.. The music starts only when I attack something, and stops as soon as the mob dies.. but does not continue while being attacked by other mobs.. ie it starts up again only when I initiate another attack..

commented

BLU.zip
this is an early copy of v1.0.0 that I'm working on. This the one I need help testing.

As far as the combat music script goes, I feel like it's going to need some logic to remember it's still in combat.

Here's the current v1.0.0 changelog.

v1.0.0

- Changed - Entire code base rewritten
- Added   - Sounds/Mute for Trade Post Activity Completed!
- Added   - Sounds/Mute for Battle-Pet Level-Ups!
- Added   - Color for readability
- Added   - Usage details in AddOn Notes
- Changed - Squished Cumulative CHANGELOG in README

I removed the hunter pet level sound code because in retail hunter pets level the same as the player so a separate sound doesn't make sense.

I'm writing a helper addon right now though. It will scrape the game for sounds that are played and output the SoundID to the in-game chat so I can better add the mute/test default functions. I'm pretty sure the soundID for the battle-pet level up isn't going to function as planned. I think WoW has 2 sounds for battle pet level ups. When you use the 'Increase batte-pet level to 20' or 'increase pet level 1' items on the battle pets(when their in the collection ui, and maybe when they're summon) it plays one sound, and when you win a battle/ gain xp from pet capture and level up that way.. I'm thinking it's a different sound. So I gotta figure that out. Also, let me know if the color changes increase readability or if it just looks stupid.

commented

Don't stress yourself, it should function mostly normally. It'll look a bit different. So basically, you just get an early copy ;P

For the combat music addon. I've been thinking about building something a bit more solid as a side project. There's a lot I don't know about the music function in the addon api, from some other addons I looked at they can do some crazy stuff with cvar. It would be cool to build on the code I've already written for you. I can avoid any copywrite issues by just saying in the description 'you guys just gotta put your song in the right folder', that should be easy enough... I think?

commented

lol k ty for the alpha to test..
for the combat music addon, the music file would have to be re-added to that folder each time there is an update via CurseForge
might be a good idea to ad a file picker code so I can point to the original music file copy in my main music folder.
If you can do that great ty?
if not I will do manually I guess.

commented

I tested your new BLU (v1.0.0-alpha)..
no BugSack popups about immediate issue with it.

commented

@donniedice hey. :D do you know if the code for CombatMusic will run on Wrath Classic too?

commented

only issue is the music will only start if I initialize auto-attacks and then use spells..
and stops if I target a friendly for healing.. lol strange huh?

commented

It actually works in wrath classic too.. nice thx so much!
I copied the CombatMusic folder form retail to classic
and changed the music sound track to FF7 battle theme.