Results 1 to 3 of 3
  1. #1

    What component price used for multilevel manufactured items?

    The general question is what price is used for the component price.

    If the elementium bars costs less than twice the ore, which is the cost basis for HEB?

    TUJ seems to be using 20 ore for the HEB cost. My claim is that if the bars are cheaper, and they tend to be, then that is the cost basis that should be used.

    One Hardened Elementium Bar, worth 104g 86s 15c, is made by the Mining spell Smelt Hardened Elementium using the following components, which cost 88g 94s 60c:
    Qty Component Each Total
    10 [Smelt Elementium] 4g 31s 92c 43g 19s 20c
    20 [Elementium Ore] 2g 47s 73c 49g 54s 60c
    4 [Volatile Earth] 9g 85s 39g 40s

  2. #2
    Erorus's Avatar
    Tagged in
    677 Posts
    Add to this user's reputation
    This will not be a short reply.

    The code to find the component cost of an item is a bit of a bear. There are two major parts:

    1) I have a database function that, when given a realm, an item, and a time (usually "now"), it will return one value, which is the cheapest component cost to build one of that item. You see this value on summary/profession pages, on the watch list in the user controls area, in the XML data exports and in the addon tooltips.

    2) I have some PHP and XSL that, when given a realm and item, returns the tree of components and their costs, and the default initial state, shown on the web page, should be the cheapest way to get those components. You see this on the item page in the "component parts" section.

    Part 1 and Part 2 should give the same value and make the same decisions, when things work properly. Sometimes they might not, since they get to the answer via two different chunks of code. Whoops.

    In general, the algorithm works like this. For the given item, find all profession spells that make this item (there's usually only one.) For each component of that spell, find all profession spells that make that component using the same profession as the first spell. Recurse down that chain as far as we can go. When we come back, we have the cheapest way to make that component (if it had spells of the same profession as the first item), and the market price to buy it as-is. Return the cheaper price of those two. Available market quantity is not used at all (since you may have some in your bank or something).

    When I looked at your link, 20 elementium ore was cheaper to buy than 10 elementium bars, so it looked like it was working properly: going down the component tree, seeing if the components are cheaper as long as they were obtained via mining. If 10 bars are cheaper than 20 ore, then both algorithms should stop at the bars and return that price. On the web page, you can still expand that tree if you want by clicking the profession's icon, just to see how the price changes or see if maybe there are subcomponents you can use from another profession.

    However, all that said, I found a realm where bars are cheaper, and sure enough, it still goes down the tree thinking that 20 ore is cheaper than 10 bars. This incorrect behavior is consistent in the database algorithm (part 1) and the web page algorithm (part 2), which boggles my mind.. I thought I'd screw up something like that only once. Looking over the code quick, I can't figure out why it isn't working right away, but I'll see what I can do.

  3. #3
    Erorus's Avatar
    Tagged in
    677 Posts
    Add to this user's reputation
    I think this is fixed. I may have broken something else with component costs in the process. Let me know if anything else looks weird.



Similar Threads

  1. Suggestion: Price information for items in a Wowhead search
    By Cuprum in forum Official Forum of The Undermine Journal
    Replies: 3
    Last Post: January 21st, 2012, 12:14 AM
  2. Mean market price
    By Aeg in forum Official Forum of The Undermine Journal
    Replies: 4
    Last Post: August 17th, 2011, 09:59 AM
  3. Further Gem Vendor Price Nerfs (And Ore Vendor Price Changes)
    By Methi in forum Archive (Speculation)
    Replies: 28
    Last Post: June 8th, 2011, 02:25 PM
  4. What are your price points?
    By Aeg in forum Archive (Auction House)
    Replies: 7
    Last Post: November 30th, 2010, 09:38 PM