Hi, I was looking for some help at modifying the code for the addon oUF Phanx (found here). I am not particularly familiar with lua editing, the extent of what I have done in the past is editing the Yorsahj raid warnings addon to say the messages I wanted.

A summary of the things I wanted to change so that people can advise me better:

Add a threat percentage attached to the target frame (similar to the optional one on standard Blizzard frames).
When out of combat, display all buffs such as mounts, costumes, etc on the target frame.

I understand why the addon author chose to not include certain features, but I really like the basic set up of the addon and just want to make a few modifications so that it works for me.

Any advice or tips are much appreciated, thanks.

edit: Suppose I should also mention that I would like to change some of the buffs/debuffs that display for certain classes while in combat.

Add a threat percentage attached to the target frame (similar to the optional one on standard Blizzard frames).

This is actually something I plan to add. I just haven't gotten around to it yet.

Originally Posted by ampere

When out of combat, display all buffs such as mounts, costumes, etc on the target frame.

You'd need to register the PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED events on the target frame's Buff element, and handle them with a function that removed the filter while out of combat, and reapplied it when entering combat. This is also something I've considered, but haven't decided whether I want to add, or in what form.

Originally Posted by ampere

I should also mention that I would like to change some of the buffs/debuffs that display for certain classes while in combat.

The aura filtering uses simple lists, which you can see in the auras.lua file. To add more buffs or debuffs, just add them to the list with the relevant value to control how you want it filtered (there's an explanation at the top of the file). To find the correct spell ID for the buff or debuff, look it up on Wowhead and copy the number in the URL.

You'd need to register the PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED events on the target frame's Buff element, and handle them with a function that removed the filter while out of combat, and reapplied it when entering combat. This is also something I've considered, but haven't decided whether I want to add, or in what form.

Just wanted to say that I would be in favor of this change. It would make your unit frames pretty much perfect for me. I definitely don't know enough about coding to do it myself.

You'd need to register the PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED events on the target frame's Buff element, and handle them with a function that removed the filter while out of combat, and reapplied it when entering combat. This is also something I've considered, but haven't decided whether I want to add, or in what form.

Just out of curiosity, since i use something similar in my layout, wouldn't it be more efficient to just add a combat check to the filter itself instead of changing the filter? Both ways work fine obviously, im just wondering about performance here.

... wouldn't it be more efficient to just add a combat check to the filter itself instead of changing the filter?

No, that would just add an extra function call on every single aura change for every unit. That's a lot of extra function calls. Much simpler to just change one table value per frame when entering or leaving combat.