Download
(273 Kb)
Download
Updated: 01-25-13 10:08 PM
Compatibility:
Landfall (5.1)
Updated:01-25-13 10:08 PM
Created:01-07-13 07:00 PM
Downloads:1,376
Favorites:0
MD5:
oUF Fail new power values
Version: oUF_Fail_Test Smooth power changes 1.4.6
by: Sauerkraut, MiRai
- For testing purposes only -
Just for you MiRai
Archived Files (7)
File Name
Version
Size
Author
Date
oUF_Fail_Test S
273kB
Sauerkraut
01-25-13 03:57 PM
oUF_Fail_Test n
273kB
Sauerkraut
01-17-13 06:37 PM
oUF_Fail_MiRai_
270kB
Sauerkraut
01-13-13 07:47 AM
oUF_Fail_MiRai_
269kB
Sauerkraut
01-12-13 10:22 AM
EA v0.2 (MiRai)
232kB
Sauerkraut
01-11-13 02:16 PM
Extra Arrow
233kB
Sauerkraut
01-08-13 04:22 PM
Extra Arrow
246kB
Sauerkraut
01-07-13 07:00 PM


Post A Reply Comment Options
Old 01-08-13, 04:39 PM  
MiRai
A Theradrim Guardian

Forum posts: 68
File comments: 74
Uploads: 0
Alright, I think I correctly uploaded what I've got (never done this before) and I disabled the version warning (not sure if that's a big deal or not). There's kind of a lot of hacking and slashing going in those files since I'm constantly tweaking the layout and I'm sure you'll notice a lot of things that could be possibly coded much more efficiently.

FYI - I use the outdated oUF_Fader plug-in for oUF and you'll see those settings listed in core.lua -- They don't seem to throw any errors if you don't have the plug-in loaded so I just left those lines in there. However, if you do happen to load up oUF_Fader, you're going to get a taint error when you first enter combat after entering the world or after a /reload (only happens once -- I've just been living with the taint error forever now since p3lim does not seem interested in updating his plug-in).

In my version (just off the top of my head -- haven't really kept a changelog):
  • X,Y positions changes for numerous frames
  • Some castbars moved
  • Stripped some text from the frames
  • BG countdown timer is now the same as the mirror castbar -- Had this change done back in Cataclysm by Choonster on the WoW UI forum (Choonstertwo on WoWI) and you're more than welcome to keep this if you like it although it has a slight blemish that I just accept (can explain this further if you're interested).
  • lib.lua contains the newest attempt at making arrows the correct color
  • core.lua reflects most of that change (no idea how to get party working)
  • Debuffs moved up for all classes now since the power arrow on the target frame is present (will need to figure something to do with combo points // will cross that bridge when I get there)

Would like to:
  • Move the ToT and FocusTarget frames just a few pixels to the right from the frames they are parented to -- When the power arrows are at 100% they overlap with those frames.
  • Correctly color the arrow for the FocusTarget & Party frames (possibly arena frames in the future)
  • Correctly color the arrow for the Focus frame w/o the need to switch targets
  • Possibly figure out why the arrow for the target frame has a 1 second delay picking up the class-color for the initial target after entering the world or a /reload

Again, this list was just off the top of my head and I'm sure I'm forgetting little changes I've made throughout the last 6+ months while using your layout.

EDIT: Apologies, but I just noticed that the focus target power arrow lib.lua is showing "focustarget". I can assure you that I did indeed try out "focus-target" like you suggested before. Also realized the ToT frame actually has it's X,Y listed in the cfg file (/facepalm).
Last edited by MiRai : 01-08-13 at 04:54 PM.
MiRai is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 02:46 PM  
Sauerkraut
A Cyclonian
 
Sauerkraut's Avatar
AddOn Author - Click to view AddOns

Forum posts: 46
File comments: 219
Uploads: 11
Try and upload your working copy for me so I can see everything that is going on. If you have a chance.
Sauerkraut is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 11:53 AM  
MiRai
A Theradrim Guardian

Forum posts: 68
File comments: 74
Uploads: 0
Originally Posted by Sauerkraut
Code:
local _, pType = UnitPowerType("player") or UnitPowerType("focustarget")
That may work but I think it would have to be focus-target since that is what the API would return.
Adding the or seems to force the arrow to the RGB color specified in the {}'s. If I change it to this:

Lua Code:
  1. lib.setPowerArrowColor = function(self)
  2.     local _, pType = UnitPowerType("player") or UnitPowerType("focus-target")
  3.     local pcolor = oUF.colors.power[pType]
  4.     self.Power.arrow:SetVertexColor(pcolor)
  5. end

...then the arrow just ends up being colored black.


Originally Posted by Sauerkraut
WOW doesn't have an event named UNIT_FOCUSTARGET so that won't do anything. You can check the events here: http://wowprogramming.com/docs/events.
Looking through the events listed there I added "UNIT_POWER" to the Target's events and that seems to make the arrow grab the correct class color upon the initial targeting but, there is about a one second delay before the arrow changes from white to the correct class color. This, however, isn't working for me on the Focus frame and I am still required to change targets before the arrow updates to the correct class color.

I also tried adding the undocumented event "UNIT_POWER_BAR_SHOW", but that doesn't seem to change anything.


Originally Posted by Sauerkraut
This thread http://www.wowinterface.com/forums/s...ad.php?t=40293 has all the discussion on how I got the coloring to work in the first place.
Man... some of the stuff that those guys say in that thread is waaaay over my head. One day I'll get to that level, but first, baby steps.

Originally Posted by Sauerkraut
MiRai I've added you as a contributor so you can upload files if you like. Just tag them oUF_Fail2_MiRai or something so we can keep the branches. I'll be able to look at it more tonight when I get home from work. See if I can't figure out the right event trigger and the focus target.
Sorry, saw your reply late (had been typing out my long reply). Thanks. My attention on this for the next few days may be short as I've got some work-related stuff I really need to take care of, but I'll be keep checking up on this.
Last edited by MiRai : 01-08-13 at 11:57 AM.
MiRai is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 11:43 AM  
Sauerkraut
A Cyclonian
 
Sauerkraut's Avatar
AddOn Author - Click to view AddOns

Forum posts: 46
File comments: 219
Uploads: 11
MiRai I've added you as a contributor so you can upload files if you like. Just tag them oUF_Fail2_MiRai or something so we can keep the branches. I'll be able to look at it more tonight when I get home from work. See if I can't figure out the right event trigger and the focus target.
Sauerkraut is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 04:52 AM  
Sauerkraut
A Cyclonian
 
Sauerkraut's Avatar
AddOn Author - Click to view AddOns

Forum posts: 46
File comments: 219
Uploads: 11
I think the NPCs class is indeterminate so it would have to go by reaction I guess. I'll have to look through the API stuff again to see if there is a simple way to do it.

Code:
local _, pType = UnitPowerType("player") or UnitPowerType("focustarget")
That may work but I think it would have to be focus-target since that is what the API would return.

Code:
self:RegisterEvent("UNIT_FOCUSTARGET", lib.setFocusTargetArrowColor)
WOW doesn't have an event named UNIT_FOCUSTARGET so that won't do anything. You can check the events here: http://wowprogramming.com/docs/events.

This thread http://www.wowinterface.com/forums/s...ad.php?t=40293 has all the discussion on how I got the coloring to work in the first place.

Lots to do still but the progress is good
Sauerkraut is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 03:13 AM  
MiRai
A Theradrim Guardian

Forum posts: 68
File comments: 74
Uploads: 0
Alright, so I've kinda gone through your default oUF_Fail layout and made my own adjustments to suit my needs, so rather than just d/l this version and try it out, I'm copying & pasting chunks of code from this lib/core.lua into my current files.

So, I now have this in my lib.lua file:
Lua Code:
  1. lib.setArrowColor = function(self)
  2.     local _, pType = UnitPowerType("player")
  3.     local pcolor = oUF.colors.power[pType] or {.3,.45,.65}
  4.     self.Power.arrow:SetVertexColor(unpack(pcolor))
  5. end
  6.  
  7. lib.setTargetArrowColor = function(self)
  8.     local _, cType = UnitClass("target")
  9.     local ccolor = oUF.colors.class[cType] or {.3,.45,.65}
  10.     self.Power.arrow:SetVertexColor(unpack(ccolor))
  11. end
  12.  
  13. lib.setFocusArrowColor = function(self)
  14.     local _, dType = UnitClass("focus")
  15.     local dcolor = oUF.colors.class[dType] or {.3,.45,.65}
  16.     self.Power.arrow:SetVertexColor(unpack(dcolor))
  17. end
  18.  
  19. lib.setFocusTargetArrowColor = function(self)
  20.     local _, eType = UnitPowerType("focustarget")
  21.     local ecolor = oUF.colors.power[eType] or {.3,.45,.65}
  22.     self.Power.arrow:SetVertexColor(unpack(ecolor))
  23. end

...and I'm trying to create a power-colored arrow for my focus target frame. Changing the 'c' in cType and ccolor to 'd' seemed to work for my focus frame (although it still suffers from the same missing event (?) as the target frame where the arrow is initially white), so I figured I would just change the 'p' in pType and pcolor to 'e'.

Then I added this in the "focustarget" section of the core.lua file:

Lua Code:
  1. self.Power.arrow.colorPower = true
  2. self.Power.arrow.PostUpdate = lib.setFocusTargetArrowColor
  3.  
  4. self:RegisterEvent("PLAYER_LOGIN", lib.setFocusTargetArrowColor)
  5. self:RegisterEvent("UNIT_FOCUSTARGET", lib.setFocusTargetArrowColor)
  6. self:RegisterEvent("PLAYER_TARGET_CHANGED", lib.setFocusTargetArrowColor)
  7. self:RegisterEvent("PLAYER_ENTERING_WORLD", lib.setFocusTargetArrowColor)
  8. self:RegisterEvent("UNIT_DISPLAYPOWER", lib.setFocusTargetArrowColor)

...but I cannot get the arrow to change from white to the actual power color.





It's super late (way past my bedtime) and I'll give it another shot tomorrow. There must be a way to combine 'frames' into each type of arrow For example:

local _, pType = UnitPowerType("player") or UnitPowerType("focustarget")

...but I don't think you can just throw an 'or' statement in there.



Finally got a chance to do some dungeons with the new arrows and realized that by using...

Code:
if f.mystle ~= "tot"
...then that adds arrows to the party frames (and raid frames) as well. I will say that I like the arrows on the party frames and will keep them if I can work this power color issue out.


I also noticed that when targeting most NPCs their power arrow seems to inherit the player's class color.





I guess I'm not entirely sure if it's inheriting the player's class color or if it just defaults to the Warrior color. Is it possible to remove the arrow from NPCs that don't necessarily have power w/o adding a boat load of code?

I don't mean to stump you with these questions and, if you'd like, we can move this into the oUF forum to see if any of those gurus have an answer for this stuff. I would also like to apologize for my wall of text replies, but I'm just trying to be thorough and give you as much information as I can regarding what code I'm using, where I'm using it, and what I'm seeing on my screen.


Thanks!
MiRai is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: