Close
Buffet source code extract
Buffet source code extract

Buffet: a World of Warcraft addon

Since September 2019 I’ve been maintaining the World of Warcraft addon Buffet, originally made by tekkub.

Its goal is to present to you the best foods, drinks and consumables items available in your bag.

Original version

The addon was using a static list of existing items to compare their respective values (how much health or mana they give) but after many expansions, this list was out-dated and more and more difficult to keep up-to-date as some items could return flat amount, percentage amount and/or both health or mana, etc…

From static to dynamic

I went back to WoW around March 2019 awaiting the release of Classic and I was sad to see that Buffet was not up-to-date for the last expansion, Battle for Azeroth.

So I took upon myself to try to update it. First I looked at the static database and tried to update it using data from external source like wowhead without much success.

I went back to the WoW API documentation hoping that it changed enough in the last few years I hadn’t played and new way to get item data was added, especially regarding items bonuses. No luck their.

The only solution left: tooltips parsing.

On paper, works fine, but it came with its bag of problems too.

The first one being localization, the second one being Blizzard itself. You may think that all food items would use the same text format with just the health amount changing, and you’d be right if it wasn’t for Blizzard which used various format and even different “white space” characters… Thanks Blizzard!

With the basic principle in head, time to rewrite the code to replace the static database by dynamic scan of the bags.

Preliminary work

I started by a fork of the original Github repository, spent some time understanding the code and them incrementally replace the static data with a basic implementation of the tooltips scanning process.

I then added a few localization for English, German and French.

By June 2019 I had a mostly stable version with dynamic scan of the bags, handling most food, drink, potion and bandage item for BFA.

I try to publish my update as a new addon with acknowledgement of the source material but Curse refuse it because of the license used for the original.

I contacted tekkub to ask permission to publish my derivative work and after a few back and forth emails we arrived to the conclusion that I could become maintainer on the current addon page and just update the Github info to point to my fork.

I made my first beta release on October 17, 2019 and my first stable release on November 19, 2019.

Improvements and stabilization

Over the course the following year I almost completely rewritten the whole code and added a few new features, tackled a lot of issues, improved the scanning process and added more localization.

The last addition (as of writing) is the ability to make custom macros using the lua language directly, allowing to handle a lot of complex cases requested by users.

More info on available here.

Final word

One of the hardest part of this project for me was creating the configuration interface. UI really isn’t my thing 🙂

The introduction of the “custom macro” feature open the door to many interesting improvements which I’m eager to implement.

Leave a Reply

Your email address will not be published. Required fields are marked *