GreenRange

This project has become inactive.

This project is inactive and its default file will likely not work with the most recent version of World of Warcraft. The author may have abandoned it, or it may have outlived its usefulness.

Some out-of-range (red) and out-of-mana (blue) buttons.

I've continued to update this, because hey, why not! But I'm pretty sure tullaRange has all the same optimizations GreenRange does now. I still think it's good to have more than one range-coloring addon out there, because traditionally most of them have been bad. If there were only one choice, and it broke, we'd be screwed. So I've continued to update this, but tullaRange is also good.

Description

GreenRange turns your buttons RED when abilities are out of range. Several addons do this, but GreenRange is very efficient at it. It's "green" because it's modern and efficient, not because of the color. :P If you really like green though, you can configure it for green!

GreenRange actually has a negative performance cost, because it replaces some really inefficient code in the default UI. It's not going to increase your framerate by more than 1, but still, it works so well that it actually improves performance vs. not having it.

Profiling

If you profile range-checking addons like this, you want to look at CPU usage, not memory usage. OptionHouse can profile CPU, but its "%" metric isn't that meaningful because it's relative to the other addons you have running. "CPU/Sec" is the easiest metric to use. "CPU" is meaningful only if you a) do the timing yourself, say 60 seconds, and compare equivalent times or divide to make them equivalent, and b) /run ResetCPUUsage() first so the counting starts at zero.

Options

There's no config UI yet, but you can use /run commands to change the colors, and the setting will be saved. These are the defaults:

/run GreenRange:SetOOR_Color(1.0, 0.2, 0.2)
/run GreenRange:SetOOM_Color(0.2, 0.2, 1.0)

You must login to post a comment. Don't have an account? Register to get one!

  • 5 comments
  • Avatar of Morsker Morsker Oct 24, 2010 at 03:13 UTC - 0 likes

    Well, it looks like I'm orders of magnitude worse at thinking I replied when I didn't. >.>

    Insanity in optimizing something to death may be my natural state. I should probably spend more time working on config screens or something!

  • Avatar of Tuller Tuller Oct 07, 2010 at 23:30 UTC - 0 likes

    I swore I posted this earlier: The addon should exist, especially if its profiling better than tullaRange :)

    I would not try to go too crazy with minute optimizations though. Its a sure fire way to go crazy :P

  • Avatar of Morsker Morsker Oct 02, 2010 at 01:20 UTC - 0 likes

    Some other things I tried that didn't work, but might be interesting.

    I tried hooking :SetVertexColor on the red buttons, so they'd memorize the attempted color change, but turn it immediately back to red. This worked, and had the trick that hooksecurefunc put the hook in the object instead of the prototype, so I could nil it to unhook it later. It didn't scale well to handling OOM colors though, because that meant hooking all the buttons not just the few red ones.

    I tried using :GetVertexColor instead of IsActionUsable, because the Bliz code had just set the color to be consistent with IsActionUsable. I thought this was very clever ... but it turns out the two functions have similar overhead, so there was no point.

  • Avatar of Morsker Morsker Oct 02, 2010 at 01:07 UTC - 0 likes

    Oh I have something I wrote up about that, and was waiting for approval before I posted the first comment. I worked on this for 5 days before I found out about tullaRange, and was somewhat disappointed since I saw you had the same main innovation of one big timer instead of N little timers. At that point I'd put too much into it to throw away though. This was a reaction to ButtonRange instead of RedRange, but I guess the two are similar enough that the result is also similar.

    The main differences I see are that I replaced the flashing logic, and I have oor > oom in priority, because I treat out-of-range as its own flag that's separate from is-usable.

    I'm not quite sure what to do with this. It does profile better than tullaRange, but tullaRange performs well enough that I wouldn't've written something just to try improving on it. I was trying to make something run better than ButtonRange.

    I'm also sort of annoyed at how much the Blizzard code spams updates on ACTIONBAR_UPDATE_USABLE. I may try unregistered the buttons for it and handling it myself, but at that point I have to consider how much I'm replacing the buttons instead of working with them; at that point maybe what I want is just to use a bar mod that replaces everything.

  • Avatar of Tuller Tuller Oct 01, 2010 at 21:48 UTC - 0 likes

    I find this interesting, since we both seem to have come to the same conclusion on how to better implement RedRange (removing the ActionButton:OnUpdate stuff). Anyways, here's my version :P http://github.com/Tuller/tullaRange/tree/master//tullaRange

  • 5 comments

Facts

Date created
Sep 30, 2010
Category
Last update
Sep 02, 2012
Development stage
Inactive
License
GNU General Public License version 3 (GPLv3)
Curse link
GreenRange
Downloads
23,757
Recent files

Authors

Relationships

Tool used
FindGlobals