Just a little heads up to everybody here. There is a poll running on the gUI community page on facebook. That poll decides the next feature to be added to gUI. Hurry up and vote while you still can!
Today I have a little gift for my fellow WoW addon developers out there. It's the gift of compatibility! So UI users, gold farmers and feral kitties, move on. This post is not for you!
This is a little piece I wrote today while laying down the groundwork for the gUI v4 engine. I intend for it to be both backward and forward compatible, so I was in need of a simple versioncheck that I could paste into my files. Because I love copy and paste!
Compability with what?
With past and future versions of the WoW client, of course! Blizzard have made a habit out of changing their Lua API quite often. By building your addons with build checking embedded, you can assure future compability in a much better way than simple asking people to "download the right version". Do the work for your users, have build specific code and see your downloads multiplied!
There can be only one!
The code you need is nothing but a simple list of queries leaving you with a bunch of constants, where only one can be true - If any at all. I could have done this far more elegant or intricate, but decided upon this very basic solution instead. Because I like the simplicity of constants.
By running this at the start of your file, you can then simply check for the constant you need later on. Or if your code requires something that has been present since a certain WoW version or build, you can simply see if the build number is high enough by using this very list as reference. All build numbers and their associated version numbers since 3.3.5 and up to at least 5.1 have been included here.
I also included patch 5.2 in this list, but that build number is retrieved from the current PTR build, and is subject to change before the patch goes live. The safe method is to check for .toc version, while making sure the build is higher than the highest build number on previous patches.
local patch, build, released, toc = GetBuildInfo()
build = tonumber(build)
-- Patch 3.3.5: Defending the Ruby Sanctum
local WoW330 = build >= 12213 and build < 12340 and toc == 30300
local WoW335a = build >= 12340 and build < 13623 and toc == 30300
-- Patch 4.0: The Shattering / Cataclysm
local WoW401 = build >= 13164 and build < 13205 and toc == 40000
local WoW401a = build >= 13205 and build < 13287 and toc == 40000
local WoW403 = build >= 13287 and build < 13329 and toc == 40000
local WoW403a = build >= 13329 and build < 13596 and toc == 40000
local WoW406 = build >= 13596 and build < 13623 and toc == 40000
local WoW406a = build >= 13623 and build < 13914 and toc == 40000
-- Patch 4.1: Rise of the Zandalari
local WoW410 = build >= 13914 and build < 14007 and toc == 40100
local WoW410a = build >= 14007 and build < 14333 and toc == 40100
-- Patch 4.2: Rage of the Firelands
local WoW420 = build >= 14333 and build < 14480 and toc == 40200
local WoW420a = build >= 14480 and build < 14545 and toc == 40200
local WoW422 = build >= 14545 and build < 15005 and toc == 40200
-- Patch 4.3: Hour of Twilight
local WoW430 = build >= 15005 and build < 15055 and toc == 40300
local WoW430a = build >= 15055 and build < 15211 and toc == 40300
local WoW432 = build >= 15211 and build < 15354 and toc == 40300
local WoW433 = build >= 15354 and build < 15595 and toc == 40300
local WoW434 = build >= 15595 and build < 16015 and toc == 40300
-- Patch 5.0: Mists of Pandaria
local WoW504 = build >= 16015 and build < 16048 and toc == 50001
local WoW505 = build >= 16048 and build < 16057 and toc == 50001
local WoW505a = build >= 16057 and build < 16135 and toc == 50001
local WoW505b = build >= 16135 and build < 16309 and toc == 50001
-- Patch 5.1: Landfall
local WoW510 = build >= 16309 and build < 16357 and toc == 50100
local WoW510a = build >= 16357 and toc == 50100
-- Patch 5.2: Thunder King
local WoW520 = build >= 16503 and toc == 50200 -- *retrieved from the PTR
gUI has always been about making the UI look good, but doing it by replacing as little as possible of the original blizzard UI. I always thought this was both easier and "safer". Turns out it's not like that anymore.
So, what is the problem here?
Today things like the compact raid frames can get tainted/broken if any addon at all adds a dropdown menu with 8 or more items in it. Just to take one of the many crazy examples. Working with the Blizzard UI, is like dancing tango in a minefield. One bad step and everything blows up! And it is always and without exception, totally unpredictable.
In gUI there are currently 2 major results of this, one of them being the randomly broken Talent/Glyph UI, the other being the RaidGroupButton-spam that occurs in various raids, like Battlegrounds.
It is slowly turning into an either/or situation, where you either 100% use the Blizzard UI, or you use nothing at all of it. Which is a problem for gUI, because gUI is a combo. With the exception of some elements like the unitframes, most of gUI is a reskinned version of the Blizzard UI.
But what will you do to fix it? We want gUI!!
Fix it? Who said I would? I have a better idea!
There's an old saying that says "if it ain't broken, don't fix it". Fine. But what if it is broken, then fix it? And when it breaks again, we fix it again? And again, and again, and again and again? At some point we have to realize that the fixing is a full time job, and either accept that, or not.
And I say not. I don't accept a lifetime of fixing. I say let's torch the damn thing!
Uh... torch it? Been sniffing faerie dust again, Goldie?
Let's just say that I as a developer has a very limited stamina for problems I don't really consider to be mine. And I've had my fair share of them over the years with gUI. This doesn't mean I have a limited stamina for work, though. Quite the contrary.
What I will do, is to continue the development of v3 as planned. Most of what's left are brand new features anyway, meaning "not modified Blizzard elements". Which again means I can port those new features to whatever else I do.
And alongside this, I will start the development of gUI v4.
gUI v4? But v3 isn't even done yet!
The Dark Knight Rises was planned before they even started making the first of the Christian Bale movies. Microsoft had planned Windows 8 since before they released XP. This is how we do things, boys and girls! We plan WAY ahead of time! We just hardly ever tell you about it. We don't like spoiling the surprises and all that! ;)
While gUI 0.9-3.0 has been all about keeping as much of the original Blizzard code as possible, gUI v4 will be all about NOT doing that. Every element the game allows me to write from scratch, I will. And yes, I do intend to include the Talent/Glyph UI in that.
Uh... ETA on v4? And v3 for that matter?
V3 is out. Don't let the "beta"-tag scare you. It is far more complete than v1 ever was. Go get it! http://www.curse.com/addons/wow/gui-v3
V4 comes when it comes. I'll keep you updated on everything. And while you're at it... you might want to stop by this page every now and then. What it is will remain my secret for a little while longer...
Does it feel like the Horde are winning most of the Silvershard Mines games you're in? Are your statistics far away from what they should be when you compare to most other battlegrounds? Well, you might be right!
The map problem
This isn't the first, and probably not the last time a map has favored a faction in a World of Warcraft battleground. It all boils down to a few simple factors:
- What is the optimal strategy
- Is this strategy easier for one faction than the other?
If the answer to the latter is "yes", than the map favors a faction, and when facing a team of equal skill, the winner will in more cases than not be the favored faction.
So what is the problem with Silvershard Mines?
See for yourself. The optimal strategy for this battleground will always be to focus on the two southern carts, because these have the shortest traveling distance. And those two carts simply happen to have their tracks closer to the Horde spawn point than to the Alliance.
So what can we do to fix this?
I never said you could. This is just me telling you to be aware of the optimal tactic, and always try to apply it. If you're lucky and hard working, maybe your win rate will go up. Knowing a weakness can only make you stronger, whether that weakness is yours or your opponent's.
So do maps need to be symmetrical?
Well, yes and no. The Horde and Alliance parts don't have to be mirrored carbon copies of each other, but travelling distance from the opening graveyard to the resource nodes, and between the resource nodes, must align for both factions if they are to have en equal chance of winning.
Arathi Basin, Twin Peaks, Warsong Gulch, Battle For Gilneas, Eye of the Storm. These are all examples of battlegrounds that are working as intended. Each faction has approximately the same distance to travel from their spawn point to the initial resource nodes, and travelling distance between the nodes are the same for both teams as well. In these battlegrounds, the better team wins.
Alterac Valley on the other hand is completely broken, but not in a faction favoring way. Let's just say that unless you run into a premade exploit team (Going around the Blizzard system to queue up more than intended in a single random battleground? Deny it all you like folks, this is a textbook exploit if there ever was one, and you should all be banned!), it's all done to who can ride and kill the fastest here. A team with 3 raidgeared tanks and 2 raidgeared healers could probably solo the opposing boss if they only got there fast enough. But that's a story for another day!
But do note how even in the broken Alterac Valley it is speed that is the defining factor of success. It's always speed, it's always down to simple math. You can argue strategy. You can argue skill. But you can never ever argue against simple math.
In case you've missed it from its facebook page and my tweets, the open beta for gUI™ v3.0 for MoP has officially started!
Since it is still in beta phase, that means some elements isn't finished yet, and some features are simply missing. Examples of this is (as of writing this) the /install feature and the /faq menu which has not been implemented for v3 yet. Other examples is the skinning of the default Blizzard UI elements like the tradeskill frames and spellbook, as those still look like the default.
But apart from that, the UI is fully functional! The unitframes are in place, the minimap, the actionbars, the bags, the chat, the tooltips, the buffs... and more! I update it daily and post regular developer updates on the facebook page.
So download gUI™ v3.0beta and join us!
And remember to donate! This is extremely time consuming work, and I am dependant on the donations and good will of the users to keep going! A little sum for you, a world of meaning for me.
All donations are done securely through PayPal, and go directly to me.
When I began working on the MoP compatible version of gUI™, I quickly realized that it would take a bit more than "a few lines of code" to make it work. Blizzard's immense code changes for MoP had pretty much rendered my entire UI dead. So I needed to make a choice. Should I put my UI on the shelf, or once more try to recreate it from its own ashes?
In less than 2 weeks from today the WoW client patch 5.0.4 will be applied to the live realms. All the new systems, skills, talents, and items from MoP will be implemented, and the game as we know it will change forever. And new areas of gold making will open up to us.