arkayenro / arkinventory

A World of Warcraft Inventory mod for Retail, Burning Crusade, and Classic
108 stars 14 forks source link

Rule not working #904

Open Sl3ith opened 7 years ago

Sl3ith commented 7 years ago

Hello everyone, I have a issue with ArkInventory. I was trying to set a rule to organize items based on certain stats, so that I could keep tracks on loots that can be upgrades for specific builds.

The rule was: type("plate") and subtype("mastery","critical"), but it doesn't work. When I try type("armor") and subtype("plate") everything work fine, but it seems I can't divide them for specific stats, but the guides I found here say otherwise (here https://github.com/arkayenro/arkinventory/wiki/RuleFunction_SubType).

I also tried type("plate") and tooltip( "%+%d+ Critical Strike","%+%d+ Mastery" ) but still nothing.

Am I doing something wrong?

joevt commented 7 years ago

I guess subtype("mastery") only works for things like gems?

If you want items to have both Critical Strike and Mastery, then you need to use an "and" statement: tooltip("%+%d+ Critical Strike") and tooltip("%+%d+ Mastery") because multiple arguments in one tooltip call is treated as multiple calls to tooltip using "or".

"plate" is a subtype, not a type, so it needs to be like this: subtype("plate")

Sl3ith commented 7 years ago

So I can make a rule like: subtype("plate") and tooltip("%+%d+ Critical Strike") and tooltip("%+%d+ Mastery") ? Like I said, it would help me separate different loots for different builds.

joevt commented 7 years ago

Yes.

But really, you should be using an addon like Pawn, create a scale for each build with different weights for each stat. Then let it calculate the total value of the item for each build. Because while Critical Strike and Mastery might be your best stats, the other stats are not worth zero. It may turn out that the same item is used by multiple builds, just because it has a high item level.

It might be possible to create a custom Rule function that uses the Pawn values to pick the best in bag item for each slot for each build. You may have to calculate the values for all your items, or maybe Pawn caches those to flag the best and second best items...

Sl3ith commented 7 years ago

That's something interesting, but I wonder how can I do that. I don't have much knowledge of LUA to pull off something like that, maybe is there someone who already done it? It's interesting btw, it's probably what I need since I use Pawn!