Part 7: Price sources, custom price sources
What is the value of an item? That is up to you to define, allthough you got some pretty nifty tools to help you out. Remember that there are no mathematical laws in economics, since the marketplace is made up of people. And people act on experiences and emotions, not arbitrary laws that does not exists. But there is math.
An item has a value. In real life we say that the value of something is what another is willing to pay to aquire it. Different people have different value-scales. A musician may value his guitar at 3 kryptonite – but me, being no musician, would trade it in for a 2 kryptonite car in a heartbeat. The market is the sum of all people, and the market decides the value. Supply and demand.
Keeping track of that value can be tricky, which is why we got price sources to help us with that. A price source is a string that will produce a value for an item based on certain conditions.
TSM har some custom price settings built in;
- DBMarket (returns the market value of the item calculated from AuctionDB. Relying on this alone can sometimes be scary. This comes from your windows application you installed earlier and contains TONS of raw data.) http://tradeskillmaster.com/wiki/index.php?title=AuctionDB_Market_Value shows how this calculation is done.
http://stormspire.net/blogs/sapu94/ explains in 3 parts how this code is optimized in-game to not slow you down. If you are a true goblin and/or geek, you should reath both links.
- DBMinBuyout (returns the value of the cheapest item on the auction house during last scan, usually lower than DBMarket, can be scary when it is not)
- matPrice (returns the cost of the item in question as defined by YOU in the auction operations tab) – this is a call to return Default Material Cost Method OR the custom override you can do yourself in crafting-> materials.
- Crafting (returns the crafting cost of the item if you are able to craft it, as in sum of all the matPrice’s involved in the recipe)
- vendorsell (returns the value for selling to vendor)
- vendorbuy (returns the value for buying from vendor)
- avgbuy (the average price you have paid for said item if you have been buying it on AH, will return nil if there is no history of you buying. Very skewed on low quantities, very good on large ones)
- avgsell (same as buy, difference being you selling them on ah. Based on accountants records.)
In addition, these can be manipulated further by prefixes like
Percentages can also be prefixed to skew values, like
You can also add or subtract static amounts of gold, and multiply and divide, like
105% Crafting +10g
Now let’s just move on to what may be the single most important window in TSM 2. Third icon, the bolts. Then press crafting.
Now, these general settings are going to act as your default values for all items ingame unless you specify otherwise. That’s why you should have 2 good working formulas in these spots, these formulas should never get stuck and return a “nil” value. I’m talking about:
Default Material Cost Method
This is the formula that is supposed to show you YOUR actual cost in obtaining said item. The Material cost. Basically all your TSM calculations that matters is dependent on this working properly.
Default Craft Value Method
This formula is used to determine the value of items you can craft, i.e. this is the formula that calculates what kind of “profit” you can expect from crafting the various items you can craft with your professions. If you screw this formula up, the only real damage done is the “profit” displayed in the tooltip and in the profession window. It will not hamper your business unless you got minimum profit thresholds on your crafting operations.
Profit – as shown in the crafting window of TSM is Craft Value – Material Cost. Formula 2 – Formula 1.
Let’s analyze further. From this point all formulas are my own, and you may want to use different ones.
Default Material Cost Method
The ‘first(‘ returns the first valid value it can get. If it fetches an error (i.e. avgbuy of an item you never bought) it will return nil, which will make first(move on and try to find a proper gold value. It goes on to calculate the first contender in this case:
The ‘min(‘ checks all values suggested inside the paranthesis, and returns the lowest one.
Vendorbuy takes care of items like enchanting vellums, pricing them right. Will return error if item cannot be bought at a vendor, forcing the formula to go to the next step looking for a price.
Buying is my own price setting which get’s influenced a bit by dbmarket and dbminbuyout to catch upgoing and downgoing trends, but it can be safely omitted for now.
Avgbuy will produce a value for items you have been buying from AH, i.e. enchantingmats, leather, ++. If you haven’t bought this item on AH ever, this will produce an invalid value – forcing the formula to go onwards in its quest for a proper price of the item.
Crafting will produce a value for items you can craft yourself, given that all the ingredients in the craft have values of their own (which is also dependent on this formula working correctly). If you can not craft this item, this will produce an invalid value as well.
So, if the item in question can be bought from vendor, you can craft it, or you have bought some lately – it will take the lowest of those prices and return as the items value. If ALL of these produce invalid values, the formula goes on, with the first( still looking for a valid value to return.
Next up is selling,avgsell,dbmarket,dbminbuyout
Selling is my own, kind of the same as Buying, taking in some market influence as well. Can safely be omitted for now.
Avgsell will return the average value of your previous sales of the item, if you have sold any lately. If you haven’t sold any of this item, the formula will go to the next step to try to get a price. In this case, the last resort.
DBMarket will check to see if there is a market value available for said item, which there usually is.
DBMinbuyout is there as the last hope if all the other produce ‘nil’-values.
This should ensure that all the items like enchanting mats, cloth, ore, gems, you name it – you should be able so see a pretty realistic value of the item.
Custom price sources
In the first tab in the TSM Main window, you have a tab in red font: Custom Price Sources
Like the sources ‘DBMarket’ and ‘DBMinbuyout’ you can here define your own price sources to be called upon from anywhere else in the addon. This feature was originally not in TSM, but it was added quite recently. I have made some of my own, which I will share with you here so you can get a picture of what can be done. Again, these are my way of running my show – you may prefer another approach.
I like both the market value and minimum buyout, but sometimes I want to account for both of them, like an average between the two. I made:
- dbavg [min ( (30% dbminbuyout + 70% dbmarket) , (50% dbminbuyout + 50% dbmarket) , (70% dbminbuyout + 30% dbmarket) )]
Sometimes, for no apparent reason – one of these values can be missing from AuctionDB, which will leave you with only half of one value, which is why it’s important to have failsafes in place.
Pricing an item you buy a lot of can be pretty hard, especially when the market price and dbminbuyout swings violently, so I wanted a litte more stable source for such items. I made the following 3 custom sources:
- buyhigh: [30% dbavg + 70% avgbuy] <– note how I call my first new source ‘dbavg‘ into this.
- buymid: [50% dbavg + 50% avgbuy]
- buylow: [70% dbavg + 30% avgbuy]
These three incorporates a varying degree of market value into my buying record of the item.
- buying: [min(buyhigh, buymid, buylow, dbavg)]
This will take the lowest value of all these combinations and return that. dbavg is added to end to prevent error in case item has never been bought.
buying is the price source I now use for stuff that I buy in quantities from AH, making sure the price gets nudged a little bit in the right direction with regards to the market – but not overly much. So far it has been working good.
Same principle as buying, but not as complicated – due to buying price being used in the all-important crafting calculations, selling will mostly be used to produce a theoretical value of an item – what you can expect it to be sold for.
AvgSell will give you the average of your own sales, but does nothing to account for where the market is today.
- selling: [first((50% avgsell + 50% dbavg),avgsell)]
This throws in 50% weight on where the market is lately and today.
Since I don’t go around remembering the Default Craft Value Method and TSM don’t have it built-in, I copy the Default Craft Value Method to make the new source mymarket.
- mymarket: first(min(buying,selling,dbavg),avgbuy,avgsell,matprice,dbmarket,dbminbuyout,vendorsell)
this is primarily used as a failsafe to get SOME value to keep another formula from crashing.
The function of this line is to try as accurately as possible to define the value of an item in the current economy. What it is worth in the common marketplace.
For stuff I can craft myself, instead of Crafting, i use mycraft for an extra fallback in case something goes wrong (a craft with some new item which doesn’t have a market value)
This is a bit next level, but if you are shuffling large amounts of ore to produce about all of the rare gems that you use – you could define the value of rare gems + mysterious essence + spirit dust as follows:
- shuffle: ((dbmarket/((dbmarket(item:76131)+dbmarket(item:76138)+dbmarket(item:76142)+dbmarket(item:76141)+dbmarket(item:76139)+dbmarket(item:76140)+(27*dbmarket(item:74249))+(2*dbmarket(item:74250)))))*(avgbuy(item:72092)*120))
This formula would have to be inserted manually into the crafting -> materials price for the 6 rare raw gems, spirit dust, and mysterious essence.
This basically checks the market price for all 6 raw rare gems, 2 mysterious essence, and 27 spirit dust (from enchanting byproduct from the shuffle) and measures it up against 6 stack of Ghost Iron Ore (which is what you need to prospect to get those materials). This will keep the prices proportional to eachother (blue gem a lot cheaper than orange gem, etc.), while still in line with the prices for ghost iron ore. This will tell you if shuffling is worth the trouble, or if you could just stockpile raw gems directly from AH.