Closed Xeverous closed 4 years ago
Old syntax idea - getting rid of code duplication, also reusing already present filter condition syntax:
Rarity <= rare {
ItemLevel 86 {
ShaperItem true {
BaseType $bases(100, 999999) { Show }
BaseType $bases(10, 100) { Show }
BaseType $bases(0, 10) { Hide }
}
ElderItem true {
BaseType $bases(100, 999999) { Show }
BaseType $bases(10, 100) { Show }
BaseType $bases(0, 10) { Hide }
}
}
ItemLevel 85 { [...] }
}
Notes:
$query(min, max)
no longer needs | filter(expr)
Open questions:
After some discussions on https://www.reddit.com/r/pathofexiledev/comments/f5113m/, the problem has been solved perfectly by introducing new conditions which follow the syntax of existing conditions:
Autogen scarabs
{
Price >= 20
{
SetTextColor $color_sacrifice
SetBorderColor $color_sacrifice
SetBackgroundColor $color_white
SetFontSize $font_scarab_top
SetAlertSound $alert_scarab_top
MinimapIcon $icon_scarab_top
Show
}
Price < 20
Price >= 10
{
SetTextColor $color_sacrifice
SetBorderColor $color_sacrifice
SetBackgroundColor $color_white
SetFontSize $font_scarab_mid
SetAlertSound $alert_scarab_mid
MinimapIcon $icon_scarab_mid
Show
}
}
The new Autogen
and Price
conditions work just like real filter conditions (they can be inherited but not overriden), except they fill the filter with data obtained from poe.ninja/poe.watch APIs. Additionally, just after the parse tree is formed all autogenerated conditions can be checked to detect invalid blocks (eg scarabs which has Sockets
specified).
This is already implemented and documentation has been updated.
The intial syntax idea to query item price looked like this:
$divination(10, 100)
. It is very good for trivial items that have only 1 property (base type name): cards, prophecies, fragments, fossils and few others.But some items have multiple properies, where each specific combination of them can significantly impact the price:
The current idea is a functional-language-like syntax which allows to apply multiple filters to one query:
$bases | ilvl(x) | influence(shaper) | price(10, 100)
.Current plans for behaviour:
Things to discuss:
| corrupted(_)
)? I would favor "explicit better than implicit".| price(10, 100)
feature somehow? "Filter" is too conflicting with everything else.