• Visit Rebornbuddy
  • what does the dynamic item filter do ?

    Discussion in 'Archives' started by Nixon233, Jan 8, 2015.

    1. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      Sorry newbie question. Just unsure what I can do to make use of this plugin!
       
    2. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      Everything that you can't do with the static item filter system, you pretty much can with the dynamic item filter. :)

      Earlier last year, support was added for actual item properties, such as estimated DPS, AR/EV/ES values, mod properties in text format, etc... The static item filter system does not make use of these new features because it was coded to only check a few "common" things. The design it uses, would need to be rewritten to support it correctly.

      Dynamic filters allow you to implement logic alongside your filters, so you can do things like "only pickup an item if you have X quantity in your inventory", or "only pickup an item because it's better than what you are currently wearing and can be swapped out", etc...

      It opens the doors for a lot more advanced things people have been wanting, but unfortunately, the core design still lags behind what's possible a great deal (because it requires rewrites of all the old systems that were not rewritten with the API change for 1.2+).
       
    3. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      Shit! was looking on switching over to this ASAP. So basically instead of going through all the affixes and telling the static to match atleast XX I could just basically set it to lets say shield having XXX amount of energy shield at atleast 30 of all resistances ?

      and only keeping one handers if they were over 200dps ?

      So I can't use this yet or I can use it just can't use some of the advanced features ?
       
    4. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      Yes, but some of the logic you have to still code yourself and there's other issues to solve, which is why it's not in use yet (besides for time reasons).

      For example, if you look at the Match function in MyItemEvaluator, you'll see a bunch of properties cached. All those are things exposed by the API, such as MinDps and MaxDps, so you can easily check them.

      For things granted though affixes, there's a lot more work that has to be done. Since the data is in string format, you have to parse out the values. I have functions added to do this, but it requires you to use the specific mod text to work properly. For example, to calculate the total resistance of an item (cold/fire/lit) based on explicit properties alone, you'd use:
      You need to register and have one post to see spoilers!
      For mods with two values, the syntax is similar, but there's an extra parameter. This is an example of matching something that added at least 1 minimal lightning damage or more than 25 max lighting damage.
      You need to register and have one post to see spoilers!
      However, there's a serious problem. In order to access the strings, the client has to create them first, so until you mouse over the item to create it's tooltip, the info for the strings is missing. This means that you can't properly match items, until you at least mouse over them first to see what their stats are, like a normal player would.

      This model is not supported in EB, so that approach is pretty much useless for production for now. I thought the client used to create them, but I just noticed the issue when testing the code, so maybe it always was an issue that I didn't notice before or it was recently changed to improve client performance. Anyways though, the old ugly stat system is currently the most reliable method for that stuff still.

      You can use all this stuff right now, but it's all advanced stuff, and the bot will do exactly what it's told to do, even if you didn't mean it. You should be very cautious with your sell filters if you go this route, but it's all there for you to mess with right now.
       

    Share This Page