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:
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.
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.
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.