Reader UI of the Week is jam-packed with Lua goodness today, and if any of you master coders out there want to share some resources for the budding developers out there, now is your time to shine. We're looking at Efn's UI today, one that relies heavily on his own coding and simple addon creation in the spirit of Grid, Pitbull, and more. For the perfect tweaks, though, there is nothing better than doing it yourself.
Efn, the floor is yours:
After reading your column for many months now, I too have decided to throw my UI into the "Ring of Public Scrutiny". Like a recent UI submitter, Skulldamage, I am a fan of minimalism.
I feel my UI is fairly unique in that the majority of it is a single custom-coded UI. I've only seen one other person in my five year WoW history who's done a similar thing, and that thing is to hand-code the majority of the UI.
For the 'typical' addons, I use Combuctor for the "single bag" display needs, and DBM for raid encounters. I also use RaidBuffStatus for monitoring the 'Well Fed' and 'Flasked' state of the raid (this will be disappearing shortly as I have almost finished the work to replace it). Finally, TidyPlates/ThreatPlates for nameplates is golden and I haven't figured out how to code my own equivalent (yet!). To be fair, I also switch some mods on and off on a per-encounter basis, such as the Atramedes mod to monitor sound levels (which I no longer need thanks to a DBM update). The rest is the result of my long-standing passion of programming. The motivation is that I've been able to code everything to use far less memory and CPU resources than even most unit frame mods alone. This yields a performance benefit that makes the whole thing very much worth the effort.
Before I explain the layout, I'll quite happily admit to drawing design inspiration from the addons that I used to use. I'm sure many of your observant readers will see shades of Pitbull, Grid and SexyCooldown to name a few. While I haven't used any of anyone else's code, I was more than happy with the way they presented themselves, so I didn't deviate too much from their style where I didn't feel there
was any benefit to be had.
I have my player unit frame just below center, with a cast bar of sorts (actually a 'radar' like the standard cooldown display). Above the player frame and to the left is a target frame, and to the left again is the target of target frame. As can be seen from the labels, the focus is laid out similarly on the right.
Each unit frame has a cast radar, health, power, buffs and debuffs. The buffs and debuffs behave a little bit smartly. If the frame represents an enemy, the debuffs it shows are mine alone, so they function as DoT timers effectively, eliminating the need to consume extra space. All buffs are displayed for frames showing the 'bad guys'. If the frame represents myself or a friend, all debuffs are shown, and short duration buffs (40 seconds or less) are displayed (I mean, you know you have Fort, MotW and so on, right? So why display them?).
Threat is displayed in a top-3 list for the target and the focus. As a tank, it is very useful to know how I'm tracking threat-wise on both mobs that I'm dealing with. I've yet to see another tank with a UI that tracks threat on multiple mobs simultaneously, so I feel this is fairly unique too.
In a similar display style to the threat meters, underneath the player unit frame can be found a custom damage meter readout. It's not interactive while in combat (mouse clicks are ignored and hence can be clicked through to select targets or spin the camera), out of combat a left click clears the meters, right click drops the meters to 'group' chat (party, or raid chat if in a raid) and the scroll-wheel lets you see more than the top five.
The raid frames are displayed bottom-middle, and they look very much like a Grid display. Some subtle differences exist, such as any player with a Curse or Poison effect (I'm a druid) has their square lit up like a Christmas tree so that they stand out like a sore thumb. Low mana (sub 30%) is shown my a blue border, and health is represented by the square's background, vertically oriented. Raid icons appear in the center of the square, sort of (just below the name, actually).
The major thing that is absent is any form of action bar equivalent. Everything I do is keybound or click-cast (again, part of my custom code). I use an N52TE for just about everything, and therefore keybinding is very easy and you seldom get mis-keys. Cooldowns are shown via the aforementioned cooldown bar, so action bars serve no purpose other than to consume precious pixels that could otherwise show me the fire I should be moving out of. All the keybinds are done as macros, taken from a simple configuration file. The click-casting actions are done similarly, and are mainly used for decursing and spot healing.
Another screenshot shows me in Moonkin form (my other spec) and contains a couple of new things of interest. Firstly, in the buffs section, you can see an icon of a mushroom and the number '3' over it - this means I have all three Wild Mushrooms placed down ready to detonate. In the thick of battle, amongst all the spell effects, it becomes easy to lose track of how many Mushies have been placed down - this solves that problem.
Also integrated into the power bar of the player unit frame is the Eclipse power number (center) and arrows for Eclipse direction. The direction and position of these arrows also lets me know which Eclipse I'm in, so there's little need to display that separately.
In the upper-left of the screen is a buff tracker, that shows me, category-by-category, which buffs I'm missing. If the icon for the category is dull and grey, I'm buffed with something in that category (for the stamina category, it means I have Fort, Blood Pact or Commanding Shout, for example). If the icon is coloured and fully opaque, I'm missing a buff. In this respect, it functions as a missing buff tracker. When the raid leader throws out a ready check, that bar triples in size and moves to just above the ready check dialog box, so I can easily see how I should respond. :) This bar disappears in combat.
I hope this wasn't too long-winded and that maybe someone can get an idea from UI that helps them in their day-to-day play. Thanks for the opportunity to share. Oh, and when someone notices the latency overlay on the Moonkin screenshot and worries about the value, spare a thought for me - this is why we want 'real' Oceanic servers!!!! :)
Thanks for the email, Efn, and I can't say enough good things about how clean and impressive the UI looks. I am excited to talk about this one, because so much of it is about the ultimate customization -- coding for yourself.
Only what I need
Efn's dual-purpose user interface fills the tanking and DPSing roles nicely. The clean, thin-bordered approach allows all of the bars and simple frames to be easily delineated from the background while maintaining a solid and profound look. The color choice, while "standard" in many ways, works well. One of Blizzard's triumphs with the classes in WoW is assigning each of them a standard color that has been incorporated into tons of addons and different interface elements, making coloring your UI and addons something of an afterthought.
The mini-tower in the middle of the screen allows for just enough opacity, in combination with the camera's distance, to make not standing in fire especially easy. There is also beauty in symmetry, each piece of the user interface above the Grid-like display conforming in width and displaying only what the current spec requires -- standard minimalism done right, I'd say.
Displaying the missing buffs during a raid is pretty excellent, and I completely forgot that people still have that addon. As a warrior, hunter, and occasionally a shaman, I don't really have to worry about the buffs that I provide, or a raid leader would have the necessary addon to check for us. Suffice to say, I love the ability for the missing buffs to grow larger on ready check and the great use of in-combat/out-of-combat addon changing, especially for the minimap.
Doing it yourself
One of the lessons to take away from Efn's write-up and UI is that coding your own user interface is hard work but freeing. If you don't like the way a certain addon deals with specific user interface elements, you can tinker around with the inner workings. However, if you're not the premiere Lua coder like Efn here, learning to tinker with the options in your UI settings is crucial to a complete understanding of what the UI can do for you, not only what it could look like.
Here's my challenge, again, to Reader UI readers this week -- save your backups and tinker with one addon that you've never played around with before. Try out options. Turn off borders. Scale to your heart's content! You'll never know everything about the addon that you download until you rummage through all of the options available.
Not doing it yourself
Some addons just work and usually work better than our own ways of thinking about a UI element. Combuctor, a one-bag mob, does bags a lot better than the default UI and makes sorting an easy affair. ArkInventory, another popular bag mod, changes things up with an emphasis on user-defined rules but still has a design philosophy much different from the default UI or even other bag mods. The default UI's bag philosophy is just that -- bags. Bag mod philosophy is instead focused on "inventory."
When all fails and you don't have the time or the patience to tinker on your own, mods come through. This is a good thing. Addon authors want this stuff to be accessible (unless the addon is purposefully complex, like ArkInventory can be), and resources are available to help you through it all. Patience is sometimes required.
Coding in Lua
So you've decided that you want to try your hand at Lua and maybe learn a little something or two about addon and UI scripting and construction. Well, there are plenty of resources available, and as new ones appear in the comments, I will add them to this article so that people can take a look. Here are a few basic resources.
If you're the kind of person who is interested in the wide world of coding and Lua, you'll be happy to know that many people consider WoW addons a great beginning for the budding coder. Lua is not the hardest language to learn, and the concepts can be used in other languages as well. There are even books about learning Lua within WoW and writing WoW addons (one even by DBM author Paul Emmerich). The addon and UI community on the WoW community site forums is wide-reaching and incredibly informative. You can find the forums here.
As always, the commenters will most likely have excellent resources for Lua coding or beginning to code in Lua. Until then, I'll see you guys next week, and keep sending in those awesome UIs to firstname.lastname@example.org.