WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   BloodyScreen, Renovation for MoP (https://www.wowinterface.com/forums/showthread.php?t=46465)

AtsayaSargeras 05-15-13 01:30 PM

BloodyScreen, Renovation for MoP
 
Hello all!
New member to this forum, been on Curse for a while now and after a bunch of people complaining about this wonderful addon no longer being supported after 4.2... I attempted (key word there LOL) to go through the LUA's and Localization files to get this fantastic addon working again.
Many hours and frustrated keyboard smashes later, I am reaching out to see what I'm doing wrong!
Here we go;
The textures are still in .blp format so that shouldn't be a problem
There are no sound formats what-so ever to be replaced updated etc.
Upon going through the LUA files, I found the main problem was the arg's in "BS_Main"..
That being said, I spent a few days switching numbers around, trial and error, and eventually got some spatter on regular damage done. Seemed exciting, still not quite good enough. The addon is supposed to splatter blood on your screen when you critically strike.
I've hit a wall with progressive success on this addon, and my forehead can't take much more bashing into the keyboard! If anyone could take some time to look through the LUA's and point me in the right direction it would be very appreciated, and I know the 100k+ fans of this addon would be thrilled.
Thanks in advance for any advice or info,
Atsaya Sargeras Alliance US

ravagernl 05-15-13 03:37 PM

Without seeing any changes in any code whatsoever, nobody can help you.

What exactly did you try changing in the files? If it's large files, consider posting the changed lua/xml files in a zip file or post them on a site such as http://pastebin.com/ and then post the link over here.

EDIT: I'm assuming you're working off from the Bloody Screen (4.2 Fan Update)?
EDIT2: In case anyone knows what it looks like: http://www.youtube.com/watch?v=XtO3kdfkPdg

ravagernl 05-15-13 04:26 PM

Ok, my opinion is that it is not worth the time to update the existing addon.
Even if you fix the problem of COMBAT_LOG_EVENT_UNFILTERED (some extra event args were inserted at mop launch, and that is why the AddOn no longer works at all), there are so many things to consider that for me it would become unmanageable to update the AddOn for major future content patches(which is why probably nobody has bothered yet).

A lot of improvements can be made to reduce CPU stress, for example:
  1. Every localization string or configuration setting is initialized or saved as a global, while it is good practice to combine them into a dictionary or associative table and then store a local reference to this global table.
  2. The event handler, on the other hand, does make use of tables, but it does so in a way that a vararg table is created for every event (yes, for COMBAT_LOG_EVENT_UNFILTERED as well...):
    Code:

    --This function handles the used game events.
    function BS_OnEvent(self, event, ...)
    local args = {...};
    if (event == "ADDON_LOADED") then
    if (args[1] == "BloodyScreen") then
    BS_Init();
    end
    end

    if ((event == "UNIT_COMBO_POINTS") and (BS_BloodBehaviour == 1)) then
    if (((BS_EnableOnPVP) and (UnitIsPlayer("target"))) or ((BS_EnableOnPVE) and (not UnitIsPlayer("target")))) then BS_AddSplatters(args); end
    end

    if ((event == "COMBAT_LOG_EVENT_UNFILTERED") and (BS_BloodBehaviour > 1)) then
    if (((BS_EnableOnPVP) and (UnitIsPlayer("target"))) or ((BS_EnableOnPVE) and (not UnitIsPlayer("target")))) then BS_AddSplatters(args); end
    end
    end


Phanx 05-15-13 08:30 PM

If the rest of the code is even half as bad as that, the whole thing needs to be nuked from orbit and rewritten from scratch. :(

Resike 05-16-13 09:04 AM

Best line from the code:
Code:

spellname, _, _, _, _, _, _, _, _ = GetSpellInfo(BS_RangeCheckAction[class]);
It shouldn't take much time to update this addon, it's only like 300-400 lines.

Phanx 05-16-13 06:50 PM

Okay, I couldn't help myself... I looked at the code. I think we have a strong contender for Worst Addon Code Ever Published. The original author apparently doesn't even know about "elseif" statements, and don't seem to realize that indices in Lua start at 1 instead of 0. Everything is a global, there are tons of "if X then if Y then Z end end" constructions that should be consolidated to "if X and Y then Z end", and basically it's just all bad. :(

Resike 05-17-13 02:47 AM

If i'm gonna have some time in the weekend i might be able to update it for 5.2.

ravagernl 05-17-13 12:41 PM

Quote:

Originally Posted by Phanx (Post 278159)
Okay, I couldn't help myself... I looked at the code. I think we have a strong contender for Worst Addon Code Ever Published. The original author apparently doesn't even know about "elseif" statements, and don't seem to realize that indices in Lua start at 1 instead of 0. Everything is a global, there are tons of "if X then if Y then Z end end" constructions that should be consolidated to "if X and Y then Z end", and basically it's just all bad. :(

I was thinking the same thing.

And even worse, those globals are prefixed with BS: BS_GeneralSettings_Trigger_Criticals_Swipes. CamelCase variables mixed with underscores? You'd think BS actually stands for bull**** :P. And if variables can be prefixed, then they can be collected in an array.

Quote:

Originally Posted by Resike (Post 278176)
If i'm gonna have some time in the weekend i might be able to update it for 5.2.

Have "fun"! :D

myrroddin 05-17-13 01:29 PM

Quote:

Originally Posted by Phanx (Post 278159)
Okay, I couldn't help myself... I looked at the code. I think we have a strong contender for Worst Addon Code Ever Published.

I was curious, and now I'm down to 8 lives. :mad:

Phanx barely touched just how bad this is. And someone wants to fix it? Better to do a complete rewrite, keeping nothing but the textures.

Resike 05-17-13 04:03 PM

Quote:

Originally Posted by myrroddin (Post 278206)
I was curious, and now I'm down to 8 lives. :mad:

Phanx barely touched just how bad this is. And someone wants to fix it? Better to do a complete rewrite, keeping nothing but the textures.

Nah even the textures are bad, should have been targa and RLE compressed imo.

ravagernl 05-29-13 06:55 PM

Quote:

Originally Posted by Phanx (Post 278120)
If the rest of the code is even half as bad as that, the whole thing needs to be nuked from orbit and rewritten from scratch. :(

You know what, if anyone ever decides to do so, please use animation groups.

Dawn 05-29-13 09:53 PM

Don't care how badly written the code is, it's a very fun addon. Someone should rewrite it, for sure! ;)

Even better would be using the bloody textures to indicate low player health! The lower the health the more blood, possibly pulsing screen corners and a heartbeat sound. Yeeeessss that would be it ... *evil genius grin* :banana:

reative_pl 05-30-13 11:24 AM

Code:

dKtgiaGEfL6LQQi7srX2eL2NIsMjbmBvCtcKFPOIVHe7uc2l1ULQ9RQQ(PiPHjQgNk1qfjAWQQ0WHshurvhtroNkzHIIBRKfdflNOhQQkpfSmO65sAIIeMkQAYsz6KUOiLtJ4YcxhLnkH(nKnJuBNG(OQkmnr8zu57kQ0ZKOhRQmAcz8IuDsvvu3IqDnL68iPxtG6VQYHvypzEddZB1q1W0mjZqzMPCdldndnZBi9uPPRH6IzNUW37ek3t43uYZVmT4KBdutLMUgQlkMsY(AAkzk5kj7uE2BtlozBOgh6uIiD1qMu55tvqcKwrEdQKWXfsZBOYWecJUcm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gwOwCEyhQidqkttabG5KIyOI(PoHtK(YCqOgOsIGJzw4gujHJlKM3aRgVXcX6QXyOIyYVG1jQbSNb1qAOXKdLG6gMmmwiwxnSZn8XQkA9erAHbLSIMbLk2Wqim6QHkdtim6kWOPjPB4LI5f08)indJfI11hcBihksAywgy14vrm5xymgy14HegsbtohJXaRgVpjrjFJJZyiegD1WFOfMH()VcG4mW6HWORguYkAgy14vrm5xW6e1zmWQXRfvL1jQXyOfvL1jQbDi5c1QbrbHtK6IB8Rn(oFpHNnFVZVnT4eCdh0OzEds0jmVHf7OeZB1QvdYGJG68uXggwOwCmSqT48MTlig3aPziZbHA))BIHfQfNhvxmBz(oV86kNY90obpX0I3LgOLJvaQCOdxO0WCjnvKlEJNT8QSm)QCxs5ob30ItWnmAnIsq9X5PschxiRM3QHoBXljCCHS6ctgOMknDnuxmHY9oNs5vzE5EtHsUPfNuA1QbHUWusEUvBa
This is blood screen for Weak Aura. When you make crit you get blood animation on screen.
Just to show that you only need Weak Aura and no others mods.

This is really simple but feel free to make something amazing :)

reative_pl 05-30-13 03:43 PM

Quote:

Originally Posted by Dawn (Post 278970)
Don't care how badly written the code is, it's a very fun addon. Someone should rewrite it, for sure! ;)

Even better would be using the bloody textures to indicate low player health! The lower the health the more blood, possibly pulsing screen corners and a heartbeat sound. Yeeeessss that would be it ... *evil genius grin* :banana:

It's no problem to make this idea in Weak Aura, really easy... But... i don't like concept. You have low life and you don't see 50% screen because you see only some blood graphics? Some sound, some pulsing screen corners ?! ...and you die, and say WTF was that?! Some sh** addon! Then maybe I turn off this in pvp? ...and in raids... and instances... and... nah, that was sh** addon - most people say.

But i like concept with pulsing screen corners and a heartbeat sound. I do this. Some low pulsed corners and sound - nothing more. Will be nice addon ,to say: "Hey! You have low HEALTH!"

Resike 05-30-13 04:14 PM

Quote:

Originally Posted by reative_pl (Post 279000)
It's no problem to make this idea in Weak Aura, really easy... But... i don't like concept. You have low life and you don't see 50% screen because you see only some blood graphics? Some sound, some pulsing screen corners ?! ...and you die, and say WTF was that?! Some sh** addon! Then maybe I turn off this in pvp? ...and in raids... and instances... and... nah, that was sh** addon - most people say.

But i like concept with pulsing screen corners and a heartbeat sound. I do this. Some low pulsed corners and sound - nothing more. Will be nice addon ,to say: "Hey! You have low HEALTH!"

Well you could set the fadeout time to lower values, so it didnt cover your screen all the time, also with opacity setting it woulnt really matter.

Edit: An awsome addon idea just hit in, Metro stlye gasmask effect with blood, and you have to use a key to wipe the blood from your screen.

Dawn 05-30-13 05:32 PM

Quote:

Originally Posted by reative_pl (Post 279000)
It's no problem to make this idea in Weak Aura, really easy... But... i don't like concept. You have low life and you don't see 50% screen because you see only some blood graphics? Some sound, some pulsing screen corners ?! ...and you die, and say WTF was that?! Some sh** addon! Then maybe I turn off this in pvp? ...and in raids... and instances... and... nah, that was sh** addon - most people say.

But i like concept with pulsing screen corners and a heartbeat sound. I do this. Some low pulsed corners and sound - nothing more. Will be nice addon ,to say: "Hey! You have low HEALTH!"

Yeah, what I actually meant is something more appropriate. Like some pulsing bloody textures on the edges of the screen. Fading in some more layers/textures the lower you get. Since animating flowing blood is off the table this is probably as close at it gets to get the feeling of flooding your screen with red juice. :D

Just watched some Let's plays of some survival shooters (Metro First Light and Resident Evil 6) and it's pretty much exactly doing what I had in mind for such an addon.

TLDR; the way BloodyScreen fades in and out some textures is visually neat. Just the position and condition that triggers it is kinda off.

The splatter in the middle of the screen is definitely not good for a fun gameplay experience in the long run. :)

Dawn 05-30-13 05:35 PM

Quote:

Originally Posted by Resike (Post 279004)
Well you could set the fadeout time to lower values, so it didnt cover your screen all the time, also with opacity setting it woulnt really matter.

Edit: An awsome addon idea just hit in, Metro stlye gasmask effect with blood, and you have to use a key to wipe the blood from your screen.

Hehe, that's exactly what I was talking about. Posted at the same time. :D


E: Just to point out, the broken gasmask visual was kinda stupid. It's not like a broken glass doesn't impact the functionality of a gasmask, at all. Does it? Yet you can still use it and extend the duration by swapping filters. *facepalm*

The way they splattered your screen with blood (and dirt) and the ability to wipe it off was really fun though.

Resike 05-31-13 12:15 AM

Quote:

Originally Posted by Dawn (Post 279007)
Hehe, that's exactly what I was talking about. Posted at the same time. :D


E: Just to point out, the broken gasmask visual was kinda stupid. It's not like a broken glass doesn't impact the functionality of a gasmask, at all. Does it? Yet you can still use it and extend the duration by swapping filters. *facepalm*

The way they splattered your screen with blood (and dirt) and the ability to wipe it off was really fun though.

Well the gasmask's functionality not just to don't let the gas reach your lung, but to cover your eyes against other type of gas like tear gas.
So it could function perfectly even with totally cracked screen.

http://farm4.static.flickr.com/3080/...82388578_m.jpg

Resike 05-31-13 06:10 AM

Gas Mask
 
Okay i managed to rip pretty much every files from Metro, and made a small showcase about the gas mask effect.

1. Download the latest alpha Power Auras:

https://github.com/Resike/PowerAuras/zipball/master

2. Import this Set into a new Page (Else it will overwrite the current page):

https://gist.github.com/Resike/5684577

And it's pretty much done. It's been made for 1680 x 1050 resolution, so you might need to change on the "Size" and the "Deforamtion" sliders a bit on every aura.

Also you can change color, blendmode, strata, animation, pretty much everything.

If a Photoshop master could change the base yellowish color of the glass to white i would appreciate it much.

Dawn 05-31-13 07:47 AM

1 Attachment(s)
Are you missing a texture file link, or am I just keep not seeing it? :)

E: Nevermind it's part of your power auras ... will check the textures in PS.

E2: ... attached the edited textures. note: I did it the fast way, maybe the alpha needs some tweaking, or something like that. Just treat as untested and report back if it looks ... "unexpected".

Resike 05-31-13 09:36 AM

Quote:

Originally Posted by Dawn (Post 279028)
Are you missing a texture file link, or am I just keep not seeing it? :)

E: Nevermind it's part of your power auras ... will check the textures in PS.

E2: ... attached the edited textures. note: I did it the fast way, maybe the alpha needs some tweaking, or something like that. Just treat as untested and report back if it looks ... "unexpected".

Looks good, now i can't decide which one to use. :P

Resike 05-31-13 11:45 AM

Also check my awsome wiping effect:

https://gist.github.com/Resike/5686627

Yes it's actually Deathwing waving!

Dawn 05-31-13 11:48 AM

gogo youtube! ;)

Resike 05-31-13 11:54 AM

Need some smaller tweaks still, then i can make a video of it, also wanted to make a Power Auras new features video anyway.

Resike 06-01-13 05:51 AM

Ok, i have no clue why but my fraps is not working since 5.3, works fine on any other games.

Edit: Managed to get it work on a x86 client.

Resike 06-01-13 11:52 AM

Here it is:

http://www.youtube.com/watch?v=FAUzB...ature=youtu.be

pelf 06-01-13 04:15 PM

That's pretty cool. I feel like I might not notice the hand wave with a lot going on, but the cracked faceplate effect is very prominent.

Also, Dubstep solves everything.

Dawn 06-01-13 07:23 PM

Nice, really looks like in does in Metro. :)

Resike 06-02-13 12:10 AM

Quote:

Originally Posted by pelf (Post 279085)
That's pretty cool. I feel like I might not notice the hand wave with a lot going on, but the cracked faceplate effect is very prominent.

Also, Dubstep solves everything.

Yeah, the wiping effect going to be easier to notice with actual blood in the screen.

Also made a vid about some other intresting effects if you guys are intrested.

http://www.youtube.com/watch?v=UpagQ8XOOkk

Resike 06-02-13 02:14 PM

I had some free time today so here you go, BloodyScreen for MoP:

http://resike.github.io/BloodyScreen/

Code is still utterly bad, i made some changes to make it better, but it's still meh...

I'll recode the whole stuff for my Gas Mask addon later.

ravagernl 06-02-13 05:15 PM

I just started working on a new AddOn based on the idea's in Bloodyscreen, it uses the alpha animation to fade in/out the textures.

I had to make transparent TGA's however, since the alpha animation does not support blend modes, which is bollocks.

https://github.com/ravagernl/splat

Dawn 06-02-13 08:15 PM

Glad to see this comin' back to life, will take a look at, both once I'm back from work. :)

Resike 06-10-13 08:55 AM

Bloody Mask
 
Started to work on Bloody Mask:

http://www.curse.com/addons/wow/bloody-mask

http://resike.github.io/BloodyMask/

Dawn 06-10-13 04:04 PM

Will try. Now I have to decide which one to use; Bloody Screen or this one. Both at once seem to be a little bit of visual overkill. :)

Resike 06-11-13 02:57 AM

Quote:

Originally Posted by Dawn (Post 279426)
Will try. Now I have to decide which one to use; Bloody Screen or this one. Both at once seem to be a little bit of visual overkill. :)

Yeah, mighe be right, i already lowered glass opacity in the next version (it will be adjusable later), also for the blood i want the same drawing area just like BloodyScrenn has, but i want it to extend it with an additional exlude area, which you can place over your character and sct addon, and blood wont be appear on that area.

Resike 06-12-13 05:26 AM

Okay my first attempt to prevent blood from mid screen has failed:



However it's a nice commercial for Switzerland. :)

Aaaand Japan there we go:


humfras 06-12-13 06:53 AM

Wouldn't it be alot easier to have multiple spawn areas?
Get random spawn area from all available => Get random point in that area => blood!

Resike 06-12-13 07:13 AM

Quote:

Originally Posted by humfras (Post 279474)
Wouldn't it be alot easier to have multiple spawn areas?
Get random spawn area from all available => Get random point in that area => blood!

Well this is still in alpha, but i think storing multiple draw areas just a waste of code. The random generator works fine, so actually the bloods gets popped totally randomly.
My current method works like this:

Code:

        TextureBlood[i]:SetTexture(AddonPath.."Textures\\"..BloodyMaskVars.TextureBlood.Type.."\\Blood"..((i % BM_NumberOfTextureFiles) + 1).."_1")
        TextureBlood[i]:SetRotation(math.rad(random(360)))
        TextureBlood[i]:ClearAllPoints()
        local Width = (UIParent:GetWidth() * BloodyMaskVars.TextureBloodFrame.Width) - (TextureBlood[i]:GetWidth() * math.sqrt(2))
        local Height = (UIParent:GetHeight() * BloodyMaskVars.TextureBloodFrame.Height) - (TextureBlood[i]:GetHeight() * math.sqrt(2))
        local x = math.random(Width) - (Width / 2)
        local y = math.random(Height) - (Height / 2)
        local PreventWidth = UIParent:GetWidth() * 0.1
        local PreventHeight = UIParent:GetHeight() * (UIParent:GetWidth() / UIParent:GetHeight()) / 10
        if x > - PreventWidth and x <= 0 and y > - PreventHeight and y <= 0 then
                x = (PreventWidth + math.random(25)) * - 1
                y = (PreventHeight + math.random(25)) * - 1
        elseif x > - PreventWidth and x <= 0 and y < PreventHeight and y > 0 then
                x = (PreventWidth + math.random(25)) * - 1
                y = PreventHeight + math.random(25)
        elseif x < PreventWidth and x > 0 and y > - PreventHeight and y <= 0 then
                x = PreventWidth + math.random(25)
                y = (PreventHeight + math.random(25)) * - 1

        elseif x < PreventWidth and x > 0 and y < PreventHeight and y > 0 then
                x = PreventWidth + math.random(25)
                y = PreventHeight + math.random(25)
        end
        TextureBlood[i]:SetPoint("CENTER", TextureBloodFrame, "CENTER", x, y)


Resike 06-14-13 10:34 AM

In the last 3 days i was working on to create and animate a "life like" blood splatters on the screen without killing both the CPU and GPU. (I was able to do this in the first day with 30-40fps drops. :P)

So here is a short video with the current stata:
Using 150x high res 512x512 textures, randomly spawning and rotating with proper exlude area, and my 5 year old PC can handle it without dropping a single fps.

http://www.youtube.com/watch?v=8h0tV...ature=youtu.be

ravagernl 06-14-13 11:40 AM

Quote:

Originally Posted by Resike (Post 279544)
In the last 3 days i was working on to create and animate a "life like" blood splatters on the screen without killing both the CPU and GPU. (I was able to do this in the first day with 30-40fps drops. :P)

So here is a short video with the current stata:
Using 150x high res 512x512 textures, randomly spawning and rotating with proper exlude area, and my 5 year old PC can handle it without dropping a single fps.
[youtube]

Wow, that looks messy. In a good way offcourse!

pelf 06-15-13 09:39 AM

That's very flashy. The only thing I might say is that you could enlarge the don't-splat-here region in the center a bit to give a bit of a larger window through which to see.

Resike 06-15-13 12:39 PM

Quote:

Originally Posted by pelf (Post 279571)
That's very flashy. The only thing I might say is that you could enlarge the don't-splat-here region in the center a bit to give a bit of a larger window through which to see.

It's gonna be user adjustable later ofc. This size feels right for my human warrior, when i use much lower only like 15-25 textures. Also i havn't added the "size based on the crit's damage" function, gonna need to recalculate things after.

Resike 06-27-13 04:17 AM

Blood and Wipe test.

http://www.youtube.com/watch?v=uYCSq...ature=youtu.be

Dawn 06-27-13 11:37 AM

Yey, animated! love this stuff. still using blodyscreen, btw. can't wait for this. :D

Resike 07-08-13 08:45 AM

I'm so lazy nowdays (Pretty much late with all my projects atm), i blame summer!

But finally i added the blood:

http://www.wowinterface.com/download...loodyMask.html

http://www.curse.com/addons/wow/bloody-mask

If you want to mess with the settings edit "WOWINSTALL/WTF/ACCOUNTNAME/SERVERNAME/CHARATERNAME/SavedVariables/BloodyMask.lua".


All times are GMT -6. The time now is 05:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI