Addon Tweaking

An addon can be the greatest tool in a fellow goldmaker's hands. An addon can turn hours and hours of pushing the same button into nothing. There are a variety of these addons, each with it's level of customizability, however in most cases they are not exactly what you need. Even with addons that have lot of options and settings, you can't always get what you want. Not to worry though, nothing is impossible, you just have to go deeper in the rabbithole. If you are missing a function from your favourite addon, or you want it to work just a little bit different, you can edit the code anytime. It might seem impossible for someone without any programming skills to tweak the source code, but in some cases it is very self-explanatory, and thus possible to anyone.
In most addons you will find files in .lua, .xml, .toc, and .txt formats. What you need is almost certainly in the .lua files. They are written in a programming language called LUA (shocking, right?). These files are not precompiled or encoded, they are merely script files, meaning that you can easily read them, and with a little bit of thinking, figure out how they work. Let's look at some examples.

TSM whitelist problem
TradeSkillMaster is one of the most frequently used addon for goldmakers. Everybody knows what it does, so I'm not going to get into an explanatory article about it now. However it has a function that not everybody uses. It is called the whitelist. The whitelist is a list of players that you do not wish to compete against on the AH, meaning that you don't want your addon to undercut them. In these cases TSM instead of undercutting, will post at the same price (given that the player on the whitelist has the lowest buyout price posted). This is not always what a user is looking for. If you have an agreement with a fellow trader, on not undercutting him on a product, then posting at the same price is not the best option, since buyers will buy your and his products in an even split, which is not what the agreement is about. In these cases you want your addon not to post, or post at a price higher then your buddy (so that when his is sold, yours will be up). There is no options for it, so you have to make one. The algorithm that does the posting can be found in the ...\Interface\AddOns\TradeSkillMaster_Auctioning\modules\post.lua file. The file itself is a mile long, what interests us starts in the 406th row. Let's look at the code:

elseif (isPlayer or isWhitelist) and not differencedPrice then
buyout = lowestBuyout
bid = min(max(lowestBid, threshold), buyout)

Now, even if you don't have any programming experience, it's not that hard to understand, it's almost in normal english. Following the same syntax that you can find in the whole file, you can modify this three lines to:

elseif (isPlayer) and not differencedPrice then
buyout = lowestBuyout
bid = lowestBid
elseif (isWhitelist) and not differencedPrice then
buyout = lowestBuyout + 1
bid = lowestBid + 1

It does the exact same thing, except that if the lowest price is from someone on your whitelist, it will post at his price +1 copper.

Exporting MySales data
MySales is an addon that records every sale you make on the AH, and displays them in a window in the game. This is very useful, however it lacks the option to categorize items by their nature. For example you can see how many Glyph of Backstab you have sold, but not how many glyphs you did, you can see how many Bloodthirsty Pyrium Belts you have realized, but not how much money you have made from the PVP (bloodthirsty) sets overall, etc. It is hard to determine how much gold you are reaping from your professions this way. The solution is to export the data from the addon. The data can be found in ...\WTF\Account\USERNAME\SavedVariables\MySales.lua. It might look sophisticated at first, but everything is there, and you can easily read it. Now, you can always write a small program that converts this mess into a readable format, however there is already an application for that. You can find it here. It will convert that file into a .csv format that excel can read, and with excel you can easily create all the graphs you want, categorize the items and such by using excel's functions.

AuctionMaster search problem
AuctionMaster is an addon that replaces your auction interface. It is very lightweight compared to Auctioneer, but it has just the best function. In my opinion Auctioneer has too much and too sophisticated functions, and it's so crowded that I can't even use the simple ones. That is why I use AuctionMaster (among many others). It only has one problem. There is an improved search interface in the "Scanner" tab. You can set the name, level and quality of the items you want to search for, as well as class, maximum price and such. However, if you do not input any number into the "maximum price" field, it will set it as zero, and return with no items. It can be solved easily by inputing a huge number so that it will give you all the items, but when you are doing a 100 searches on an average day it can become pretty annoying. That is why you should look through the code.
What you are looking for is in ...\Interface\AddOns\AuctionMaster\src\main\Scanner\SearchScanModule.lua, in the 73rd line. There is a function there, which the addon uses for the search. What you need to do is to tell it that if the max price is set to 0, then reset it to a very large number. Now, even if you don't know anything about LUA's syntax, and the variables that are floating around in this code, just by looking at the rest of the file, and others in this addon, you can easily figure out the rest. But just in case you don't, all you have to do is to write this to the beginning of the function (starting at line 76):

if (self.searchInfo.maxPrice==0) then

I hope that these examples convinced you that poking around in the addon files can be very rewarding, especially if you have something in mind that you want to change in your addon. I think that minor changes can be made by anyone, since LUA is a pretty straightforward language, however, if you feel overwhelmed, try asking for help on our forums.

4 comments: on "Addon Tweaking"

  1. For 75% of my posting needs I use auctionator. Also use it for seeing whats being sold and needs to be reposted. Has saved me a ton of time.

    I'm hesitant to use TSM myself. It makes money, it automates the system. But I still personally like to have a little mental workout on what needs to get posted. but have been debating on using it for enchants and inscription.

    I take it that you don't recommend auctioneer anymore
    for an addon?

  2. Auctioneer is just too much in my opinion. Besides, a big portion of it's functions are stuff that I'd rather do manually because it is very dependant on the context. For example I'd never just buy stuff based on a "converter search" because it only sees the current price of the lesser and greater essences, and calculates my profit based on that. It doesn't see if the price is only low or high because someone posted with one figure less or more by accident, and it doesn't see when the patch came out, or what is happening in the virtual world.
    On the other hand AuctionMaster is just what I need, and I recommend it to everyone. It has a sniping function, a very detailed searching tab, and it's easy to bulk buy with it, since you can use the shift-click method.
    And TSM is just simply the best:) I've recommended it to several of my friends. On the first day they were all tired of setting it up (because it takes a lot of time to set it up), but after they got used to it, they all said it is the best addon they've ever seen. It automates pretty much everything that can be automated:)
    I like mental workouts too, but the university is more then enough for that, besides on most days I only have time to do everything automated.

  3. Agreed. I'm running into the lack of time issue with some of the work I've been doing lately.

  4. Hello,

    Thanks for the post, we tend to use Auctioneer as our add-on for the Auction House in WoW.
    I agree with you, Addons really are key to making gold in cataclysm.

Post a Comment

Insider Gold Strategies

Enter Your Name & Email Below to Receive My 7 Theories On Making Gold... Guaranteed to Put You Ahead of 99% of Players Out There



Recent Comments

Subscribe to recent comments


Blog Archive

Featured On: