Open Alice-Storey opened 1 year ago
even though I'm not having the exact same issue, my request would solve that isse too:
please allow us to set priorities for integrated "system" assignments, so we can mix those with custom rules however we like
OP is confusing item type/subtype with category, they are not the same. the default category is based off those to start with but then i try to fix the obvious garbage so the resulting default category is something sane.
the priority for the default assignment is dead last. rules have priority over it.
The issue is, the filter processes rules before System Categories. This would make sense if categories could not be disabled, in order to make use of rules, but since categories can be disabled, it makes it impossible to interact with them on a priority basis. Strangely, this conflicts with the wiki entry at /wiki/UserGuide_Explanation_CategoryAssignment:
The issue is, the filter processes rules before System Categories.
default system categories. hardcoded system categories come before rules - there is a difference
This would make sense if categories could not be disabled, in order to make use of rules, but since categories can be disabled, it makes it impossible to interact with them on a priority basis.
im not really sure what you mean here. the priority is user set (custom or system) category assignment > rule > default category. that order cannot be changed, its how its coded.
can you give me an example of what is meant my priority?
Strangely, this conflicts with the wiki entry at /wiki/UserGuide_Explanation_CategoryAssignment:
it shouldnt as assignments follow that as stated
please allow us to set priorities for integrated "system" assignments, so we can mix those with custom rules however we like
if you want a rule to be able to apply to an item then do not assign it to a custom or system category, leave it on its default category - thats how the "priority" works
the code looks something like this
if customcategory[itemid] then
return custom category id
elseif systemcategory[itemid] then
return system category id
elseif rule[itemid] then
return rule category id
else
return default category id
end
Context: Some type/subtypes are very broad, such as 15>4 (misc>other), where some items have a default category and some do not (falling back on System>Bound[0403]). If I create a rule to filter the misc>other items that lack a specific category, it inevitably includes items from other categories that I want assigned to specific places, such as keys or reputation items. These other categories appear to have no other specific property to filter by, meaning I can't create a rule that distinguishes them.
An example, within type:15 subtype:4 itemid:187612 (Key of Flowing Waters) defaults to category System>Key[0406] itemid:205423 (Shadowflame Residue Sack) defaults to the fallback category System>Bound[0403] So if I make a rule "itemtype(15) and itemsubtype(4)", it will include both these items, even though I want the category System>Keys to remain intact and assigned differently.
The issue is, the filter processes rules before System Categories. This would make sense if categories could not be disabled, in order to make use of rules, but since categories can be disabled, it makes it impossible to interact with them on a priority basis. Strangely, this conflicts with the wiki entry at /wiki/UserGuide_Explanation_CategoryAssignment: "The category an item gets is assigned in the following order; has the item been assigned by the user to a Custom Category has the item been assigned by the user to a System Category does the item meet the requirements of a Rule The reason system categories are checked before rules is so you can "hard code" an item to stay in one of the system categories even if a rule would have picked it up."
Now, it would be nice if there were a rule function such as "category(int)" so that I could filter based on the default category designation. In that case, for the above example I could do "itemtype(15) and itemsubtype(4) and not category(0406)". Another solution could be, to designate a priority value for system categories: categories could each have a priority value in order to be prioritized above or below rules granularly according to the configuration. Otherwise, I don't see a solution in the existing documentation -- the documentation even tells me a different behavior than what I'm observing, and there doesn't seem to be a hard fast way to distinguish the items that I'm working with within these broad types.