• Visit Rebornbuddy
  • Recipes

    Discussion in 'Archives' started by tozededao, Sep 21, 2014.

    1. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Recently I've been trying to figure a good way to have a plugin that would do Chaos Recipe Turnins by itself.

      I've came up with a solution which probably isn't the best one but its probably easy to implement.

      Requirements: Item Filter would need to have more complex options such as (If Unid Chest Armour Stash Count < X Use Filter1 else Use Filter2) X ammount would be configured accordingly, problaby a 3 or 4 value would suit fine. (Filter1 could be UNID Chest, Filter2 could be ID and vendor if item is bad or save if it is good)

      How we would do it: We would save every Helmet, Body Armour, Belt, Boots, Gloves, 2Handed Weapons until we reached a certain ammount of each one, after that we would have our "buffer" and we could ID/Vendor/whatever you prefer past that.

      What would the Recipe Plugin do: Each time you went to town, or for example after a completed dominus/piety run(this way we would need to have Boss Farm plugin to send a signal so we know the run is complete), the Recipe Plugin would retrieve data from stash(maybe limit it to some tabs if we have too many) and as soon as we had a full set to vendor it would take it out of stash and vendor all at once.
       
    2. cyberbot

      cyberbot Member

      Joined:
      Mar 15, 2014
      Messages:
      220
      Likes Received:
      2
      Trophy Points:
      18
      Since not every type of items has the same drop rate, the plugin will also need to sell items that are in overabundance.
       
    3. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      That's why I said item filter would have to be more complex.

       
    4. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      The Item filter system gives you everything you already need. It's design doesn't include non-item matching logic, so you wouldn't change anything in regards to that (not that you could anyways, since it's internal bot code). Dropping in your own item filter system instead is pretty simple with the new setup. However, none of that is really needed.

      What you would do instead, is just write new logic for doing exactly what you want via tasks.

      The hard part is always finding the best way to get things working together and not conflicting, so making a new bot implementation that does the recipe for you would be the easiest and simplest start for getting something working. The challenge of trying to add more complex functionality to BasicGrindBot stems form the fact it's closed source, so you're pretty limited in terms of trying to give it all the bells and whistles, even though the current design allows you to do that if you want.

      It would be better coding something from the ground up (look at ExampleBot as a start, for example) that takes all these things into consideration, because otherwise, Feature Creep becomes an issue and makes life a lot harder for you. That's the downside to feature driven development, which is something we don't do in your implementations (we get something basic going, and leave it alone).

      As with anything, when it comes to programming and development, you have to break down your task into smaller, more manageable parts, and build up towards something you want from there. If you take the approach of trying to code exactly what you want how you want it, you're going to discover a lot of problems along the way inherent to trying to develop that way.

      Here's how I'd suggest breaking the task down:
      • Don't try and make things complicated. K.I.S.S. Design the plugin to run occasionally, rather than all the time or after tracking the entire stash and trying to manage changes.
      • Go to stash and attempt to withdraw a full set.
      • If you have a full set, vendor, and start again.
      • If you don't have a full set, stash the stuff, and don't run until some time later.

      That's literally all you have to do for a simple chaos vendoring plugin. The logic for the tasks isn't too complex either, just checking item types. All you do, is make use of the convenience coroutines for doing more complicated tasks such as withdraw, vendor, stashing. The only real gotcha is thinking though how you're going to make sure your new logic doesn't interfere with the old. This can be accomplished by adding in another task that runs at the point you want to run the logic at, but simply sets a state flag so your added tasks (which should be added before any inventory tasks that would otherwise mess them up) know they can properly execute.

      The next beta (expected later tonight) will have an example plugin called ChaosChanceRecipe that implements this simple implementation as I've described. It will serve as an example for this general nature of task (any recipe really, just need the correct logic) If you have a lot of stash tabs it will be very slow the first time it runs (each time you restart Exilebuddy), and pretty slow each time afterwards as it needs to recheck each tab each time it goes though stash. It works though, so you can look though the code to get an idea of how you could make it more efficient if you really wanted to (additional logic needed in ShouldWithdrawFromTab to stop checking tabs after some time). There's no point really though, as the API works from processing the currently selected tab, so at best, you skip withdrawing an incomplete set, but still have to go though Stash again if there is a full set. Simple and working is the motto, so any changes or improvements will be up to users.
       
    5. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Thanks for the feedback!
       
    6. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      This would be beautiful. I'm looking forward to this beta with the examples for maps and this chancing,
       
    7. iargue

      iargue Member

      Joined:
      Mar 20, 2012
      Messages:
      125
      Likes Received:
      2
      Trophy Points:
      18
    8. mrfuture

      mrfuture Member

      Joined:
      Nov 12, 2014
      Messages:
      86
      Likes Received:
      0
      Trophy Points:
      6
      So how our item filter should like to make this plugin work? I mean what about identyfing items?
      He should just stash all lvl unid 60+ rares right?


      EDIT: ok stupid question i figured it out.
       
      Last edited: Nov 21, 2014
    9. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      Better see general for most of the updates. Pushed told us that we can literally stop the item filter on certain number of items found (IE 1 ILevel60 chest piece turn off item filter) he didn't say if we could turn it back on or not but I'm assuming we could code it to. Then if somehow figured a trigger to all pieces found to sell in grindbot we would be set.
       
    10. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      filter.Enabled = true;

      To enable a disabled filter. :)
       

    Share This Page