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".


All times are GMT -6. The time now is 09:07 AM.

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