<snip>
How TSM Calculates Profit and LossTo understand how TradeSkillMaster does all of this, we need to break it all down into steps. Previously, I talked about the steps, but glossed over several important factors. Hopefully, I remedy that oversight with this article.
Step One: Material CostsThere are two main methods of acquiring materials that are needed when crafting: buying them from the auction house/vendors, and farming them yourself. TSM values both methods the same way, using the cheapest source. People often ask why, especially since farmed materials are free, right? After all, you aren't buying them. To answer that, we need to see how TSM prices materials. Looking at the knowledge base, we find a price source MatPrice, which is defined via /tsm, settings, crafting, Default Material Cost Method as being min(dbmarket, crafting, vendorbuy, convert(dbmarket)). That's a lot of technobabble.
Translating Technobabble into Something Understandablemin() finds the cheapest or lowest of all the supplied parameters, arguments, or values. In this case, dbmarket, crafting, vendorbuy, and convert(dbmarket) but what are those?
dbmarket is your realm's market value, and you can read how it is calculated in the link. It is a 14 day weighted average, favouring the 3 most recent days. Without the TSM desktop app, you do not have access to this price source. if you buy anything from the auction house, this is the value of that item. Not "right now", but its average trending price, or the price you can expect to pay, given the item's recent history.- crafting, which I will go deeper into below, means, in terms of materials, "can I craft this material", such as copper bars, which are crafted from copper ores, or rejuvenation potions, which are crafted from herbs and/or healing potions and mana potions.
- vendorbuy is buying materials from NPC vendors, and what they charge for the material. This never includes limited supply items, only items that NPCs have unlimited supplies, like vials, threads, dyes, etc.
- convert(dbmarket) is a hard-coded conversion table for materials that can be, well, converted, from one to another. This almost never requires you to open your crafting UI, usually can be done directly from your inventory, and normally do not need a profession or recipe to accomplish. There might be exceptions, but there aren't many if they exist. Examples would include Battle for Azeroth fish --> Aromatic Fish Oil, or 3 Small Brilliant Shards <---> 1 Large Brilliant Shards.
MatPrice = min(dbmarket, crafting, vendorbuy, convert(dbmarket))We need to know MatPrice to calculate Crafting, and now we know. What we don't know is why farming and buying are the same.
<snip>
Step Two: Crafting CostsContrary to the wording TSM uses, the Default Craft Value Method is not the Crafting cost of an item. Instead, the DCVM is what a crafted item is worth at the auction house as of the last data snapshot.
What first(dbminbuyout, dbmarket) * 0.95 is doing is a check, which is not to be confused with the check(a, b, c) function, to see if the crafted item is currently listed, and if yes, use its last known price as its value (dbminbuyout). If there is no current auctions for that item, use its market value instead (dbmarket) and in either case, adjust for the 5% cut the auction house takes if the item sells (* 0.95).
The Value of CraftingThe sum total of matprice(a) + matprice(b) + matprice(c) = crafting. For a copper bar, that's 1 copper ore. For a healing potion, that's 1 Bruiseweed + 1 Briarthorn + 1 Crystal Vial.
Step Three: Calculating Profit or LossFinally! We know the value of a crafted item, which is the DCVM, and we know the cost to craft the item, which is the sum of the material costs. It is time to calculate the profit or loss. That's easy at this stage. Profit/Loss = DCVM - Crafting. This hold true for almost every crafted item. Of course, Blizzard put in a wrinkle, and alchemy be thy name!
<snip>