Not signed in (Sign In)
  1.  
    This question isn't precisely what you might expect from the title. I understand what a baserule is intended to do. What I'd like to know is, what is the complete syntax for specifying a baserule?

    People are always referred to the wiki, which works if all you want to do is cut and paste the generic rule there. If you want to actually understand all of the nuances, then you're pretty much left ignorant by the wiki docs.

    As an example - The wiki docs list a number of variables that are provided for your use and suggestions as to how to use them. You get an example such as:

    basePrice=(auctPrice*2+consPrice)/3


    which is great. Mysteriously,though, the next example is

    basePrice=Auctioneer.Statistic.GetHSP(auctKey)
    basePrice=basePrice * itemCount


    What the heck is Auctioneer.Statistic.GetHSP()? Where is it documented? Sure, as a programmer I can figure out that it's a method that's apparently "compiled" into the Auctioneer mod. For a non-programmer, it's so much hand waving. Where is the explanation of the method and, more to the point, where is the documentation of ALL of the available methods?

    This leads into the title of this thread. What is a baserule, exactly? Is it a bit of text that's parsed and interpreted by the mod or is it actually a bit of lua script code that just gets executed by the mod and the results used by bottom scanner to generate a pass/fail on an auction?

    Again, from the examples:

    local _,_, quality, level, _, class, _,_, equip = GetItemInfo(itemID)
    if (quality>=2 and level < 20 and class =="Weapon" and equip and buyPrice < 9000) then
    action="buy"
    reason="de"
    end


    This theoretically recommends a specified class of weapons that fit your character, which is an innovative use of BTM to do something other than just scan buyouts. It's doing it, though, using all kinds of undocumented behavior.

    What is local? It looks like it's declaring some local variables, but it's chock full of placeholders (_) and it seems that the values being "local'ed" are actually being initialized in some fashion from whatever auction is currently being considered. What are those placeholders doing? What are all of the possible "local" variables? What are the possible values for class? What is GetItemInfo() and why isn't it an Auctioneer method? Is it a built-in function of the lua script engine? Again, where is the documentation to support this function and the others that are presumably available for use?

    It seems that baserule functionality is barely even touched upon in the wiki docs. Now, if it's a bit of lua script then I suppose there's nothing really to say other than "go learn lua". Even in that case, though, I wonder if we couldn't at least get a list of the useful Auctioneer methods and some ideas on how to incorporate them into a baserule?
    •  
      CommentAuthordinesh
    • CommentTimeFeb 8th 2007 edited
     
    Posted By: slickriptideIt seems that baserule functionality is barely even touched upon in the wiki docs. Now, if it's a bit of lua script then I suppose there's nothing really to say other than "go learn lua".

    Bingo. A BaseRule is a bit of LUA code - the "complete syntax" is LUA. If you don't know LUA, or are at least interested in learning it, you shouldn't even consider building your own BaseRule. At best, you can copy one of the pre-existing ones and use it, or just stick with the default rule. I'm certainly not going to waste my time explaining LUA syntax - there are plenty of other sites out there that already do this.

    To be perfectly frank, BTM is intended to be a little difficult to use and understand. It's an advanced tool, and was (originally at least) intended only for a select audience. Norganna later decided to release it to the public.

    If you are willing to learn LUA, then read on. The variables available are the ones we define elsewhere in the BTM code. Eventually we might document all of them in the wiki, but until then, you can open up the code and look for yourself. The key ones are already documented for you in the wiki, lucky you. Some more advanced ones (like the HSP you reference) come from other parts of Auctioneer, some of which were explained in forum posts, some of which might not have been. Some of the functions included in the examples are defined elsewhere in Auctioneer, and some are base WoW API calls. Rather than being spoonfed all this info, you're going to have to learn a little bit about WoW addon coding if you want to really understand and take advantage of it all.

    BTM's BaseRule was an enhancement made to BF to allow for more custom item evaluations, rather than just relying on the auctioneer HSP or median prices. It only has to do one thing: set the basePrice, which is the price BTM thinks you can get by reselling the item. Very recently, we added the ability to tell it to bid/buy an item for arbitrary "reasons" (I confess I have barely looked into this since it was added last week). There are also a few optional things you can have it do (set the deposit and AH cut listed on the tooltip). These are also already documented in the wiki.

    BtmScan (and particularly Bottom Feeder before it) started out as fairly simple tools with very little user customization available. As users have made great suggestions, we have added more complexity to it. If you want to take advantage of that complexity, you're going to have to put a little work in. If not, the base product works fine, and we do provide some templates that you can just copy and use turnkey.

    But please don't harass us for not fully explaining how to use every advanced feature. Read the forums, ask on IRC, and learn LUA. Then as your questions get answered, feel free to update the wiki yourself, so that future users get the benefit of your knowledge.
  2.  
    Groovy, thanks for the reply. I don't expect the folks here to be offering classes in lua programming. *heh*
    •  
      CommentAuthordinesh
    • CommentTimeFeb 9th 2007
     
    i did just update the wiki information a little, anyway.
    • CommentAuthorOnyx
    • CommentTimeFeb 12th 2007
     
    Posted By: dineshi did just update the wiki information a little, anyway.

    Nice. Clarifies it a lot better now. Especially that de/vendor is *not* influenced by the baserule.

    Thanks!

    Onyx.
World of Warcraft™ and Blizzard Entertainment™ are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.