Skip to content

Add discovery/owned filter conditions - #95

Merged
Elmegaard merged 2 commits into
mainfrom
feature/loot-filter-discovery-conditions
Oct 2, 2026
Merged

Elmegaard merged 2 commits into
mainfrom
feature/loot-filter-discovery-conditions

Conversation

@Elmegaard

Copy link
Copy Markdown
Contributor

Adds the loot filter tokens [discovered], [allDiscovered], [owned] and [allOwned], evaluated via the D2Client_GetItemDiscoveryState export (DISCOVERYSTATE_* bitmask) resolved from ProjectDiablo.dll in BH::CheckForPD2, following the same GetProcAddress pattern as the PD2 sound hook. Conditions evaluate to false when the dll is absent.

The predicates are variant-group aware and also cover unidentified unique/set drops: those have no file index client-side, so the dll aggregates the state of every grail-eligible variant on the base item's code instead. Rules can now highlight anything not yet discovered/owned and hide drops whose base is fully completed.

Adds the loot filter tokens [discovered], [allDiscovered], [owned] and
[allOwned], evaluated via the D2Client_GetItemDiscoveryState export
(DISCOVERYSTATE_* bitmask) resolved from ProjectDiablo.dll in
BH::CheckForPD2, following the same GetProcAddress pattern as the PD2
sound hook. Conditions evaluate to false when the dll is absent.

The predicates are variant-group aware and also cover unidentified
unique/set drops: those have no file index client-side, so the dll
aggregates the state of every grail-eligible variant on the base item's
code instead. Rules can now highlight anything not yet discovered/owned
and hide drops whose base is fully completed.
[discovered]/[owned] become [anyDiscovered]/[anyOwned], matching the
[allDiscovered]/[allOwned] pair so any-vs-all semantics is explicit in
filter rules.
@Elmegaard
Elmegaard merged commit caa2b93 into main Oct 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant