What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Future] New item evaluator + rule additions

Apoc

Well-Known Member
Joined
Jan 16, 2010
Messages
2,790
Reaction score
94
So, there's been a lot of complaining about the item rules evaluator (rightly so). A week or so ago I basically rewrote the entire evaluator, and added some new features to rules (as well as removed some). Firstly, the bugs related to stack count, and quality, etc, are gone. I realized later that the way we were doing things before, only caused confusion, and bugs in our own code trying to handle it. I pulled that entire functionality out (and did some hackishly quick wrapping to provide backwards-compatibility with old rules) and replaced it with a much more stable, and easier to understand quality system.

So, on to the changes.

First of all, the item manager no longer checks for certain things when running the "Keep" logic. Item rules are now responsible for telling the bot if they want to keep gems, and crafting reagents. The bot no longer automatically stashes these for you.

The bot also no longer lets unidentified items to be added to the Salvage, or Sell lists. This avoids issues with the bot trying to do things it obviously can't. Oh, and it checks if an item is Magic or above before trying to salvage. No more loops trying to salvage a white item!

With the above said, it will still automatically sell any white armor/weapons, as I can't honestly think of a reason to even keep these. (Maybe in a later patch if they do something with those types of items, we'll remove that logic as well)

On to the changes in the item rules themselves...

First and foremost, the entire "quality" attribute is gone. Instead, it is replaced with a "stat". (Rule stat="Quality" value="Rare4" for example) This means you can now define the stat once, and be done with it, instead of multiple times and hoping you got it correct.

I've added "or" logic to item rules. This means that any stat with the logic="Or" attribute, must match. Only one must match! This means you can be more flexible with your item rules. The following is an example:

HTML:
      <ItemRule description="Good Quality Magic Items">
        <StatRules>
          <Rule stat="Quality" value="Magic1" />
          <!-- Or logic here will mean either it's a 61+ ilvl item, or a legendary. Both of which we want to keep. -->
          <Rule stat="Level" minValue="61" logic="Or" />
          <Rule stat="Quality" value="Legendary" logic="Or" />
        </StatRules>
      </ItemRule>

Notice that there are both "and" and "or" rules here. (By default, all rules are "and") The evaluator will ensure that all the "and" rules match, and at least one "or" rule matches as well. (If there are no "and" rules, then it will only evaluate the "or" rules) The above rule will match any magic item with level 61+, or any legendary item.

Another, more common change, would be as follows.
HTML:
       <ItemRule itemBaseType="Jewelry" description="Magic Find Jewelry with Stats">
        <StatRules>
          <Rule stat="Quality" value="Rare4" />
          <Rule stat="MagicFind" minValue="30" />
          <Rule stat="Strength" minValue="100" logic="Or" />
          <Rule stat="Intelligence" minValue="100" logic="Or" />
          <Rule stat="Dexterity" minValue="100" logic="Or" />
        </StatRules>
      </ItemRule>

Before, this would require at least 3 (maybe 4) completely different rules. It's now packed into 1 rule, which makes things easier to not only write, but match.

These changes should help people in creating more useful item rules, and fix a lot of the bugs concerning them right now.

In the future, I hope to introduce "required stats" on rules, so you can match based on specific sets of stats. (Right now, a 30MF 30GF amulet, will be matched by a rule for just 30MF, even if you have a rule for requiring 35MF/30GF if they're found in combination on a single item.) There is no ETA on this, but its on our todo list for the future.
 
Did we still need 2 loot rules for eu and russian? or can we use the same?
 
Ghostie's Loot Rules are updated and ready to roll when the system gets updated \o/
 
Problem is it still can't give a good evaluation like ghiles plugin does.
Lets say we want a weapon or STR or DEX or INT (main stat)
then we want or CRIT over 50 or LOH or LS or SOCKET

Now we have 7 or cases which should be only 2 groups.
Question is can you make it possible to group those or's.

something like this:

Code:
       <ItemRule itemBaseType="Weapon" description="Good weapons">
        <StatRules>
          <Rule stat="Quality" value="Rare4" />
          <Rule stat="Strength" minValue="100" logic="Or" group="1"/>
          <Rule stat="Intelligence" minValue="100" logic="Or" group="1"/>
          <Rule stat="Dexterity" minValue="100" logic="Or" group="1"/>
          <Rule stat="CriticalDamage" minValue="50" logic="Or" group="2"/>
          <Rule stat="LifeOnHit" minValue="400" logic="Or" group="2"/>
          <Rule stat="LifeSteal" minValue="2.5" logic="Or" group="2"/>
          <Rule stat="Socket" logic="Or" group="2"/>
        </StatRules>
      </ItemRule>

- Never wrote real rules but i guess the point is understood.
 
Well im glad if you just fixed the loot bug. I hope you got all the different gear included now aswell.

Good work Apoc, always nice to see posts like these. I hope there will be ALOT more of them!
 
Did we still need 2 loot rules for eu and russian? or can we use the same?


yes, no and maybe

Yes if you are doing searches by itemName since the names are localised and theres nothing they can really do about that. Luckily the new system has a few groovy new itemType's that will makes some of the other stuff a little easier meaning loot rule writers could easily spam out a universal version that works with all clients regardless of language which wouldn't include any itemName searches but it means it would pick up all gems since we tend to filter them by itemName.
 
Back
Top