Thread Tools Display Modes
05-15-13, 01:30 PM   #1
AtsayaSargeras
A Kobold Labourer
Join Date: May 2013
Posts: 1
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
  Reply With Quote
05-15-13, 03:37 PM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
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

Last edited by ravagernl : 05-15-13 at 04:35 PM.
  Reply With Quote
05-15-13, 04:26 PM   #3
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
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
  Reply With Quote
05-15-13, 08:30 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
05-16-13, 09:04 AM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
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.
  Reply With Quote
05-16-13, 06:50 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
05-29-13, 06:55 PM   #7
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Phanx View Post
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.
  Reply With Quote
05-29-13, 09:53 PM   #8
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
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*
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » BloodyScreen, Renovation for MoP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off